Skip to content

Conversation

benemorius
Copy link
Member

@benemorius benemorius commented Jan 23, 2019

Contribution description

This adds support for kw41z-mini. It's much the same as frdm-kw41z except it has half the memory and no dcdc. Also no load caps on the crystals. I plan to be making them regularly unless the stm32wb ends up being a much better chip.

Testing procedure

Radio support needs #7107

Everything I've tested seems to be working. I haven't taken a close look at low power modes yet (with #7897) aside from getting down to about 5uA and being unable to wake afterwards. I didn't pursue it further but I plan to soonish.

I just realized I've never tested I2C and I don't have anything handy to test with, but if it works on frdm-kw41z then it must work on kw41z-mini because they use the same I2C pins and I copied and pasted the I2C configuration.

Tested:

Issues/PRs references

Continuing the discussion from #9934, I don't see much room for combining common kw41z files. The only things I see that could be picked out are timer and xtimer configurations and spi_clk_config, but I don't know that it's worth it for that and there can be valid reasons for a board to change the timer.

@benemorius benemorius force-pushed the kw41z-mini branch 2 times, most recently from efb92fb to 54d5505 Compare January 23, 2019 08:27
@miri64 miri64 added Type: new feature The issue requests / The PR implemements a new feature for RIOT Area: boards Area: Board ports labels Feb 18, 2019
@stale
Copy link

stale bot commented Aug 22, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions.

@stale stale bot added the State: stale State: The issue / PR has no activity for >185 days label Aug 22, 2019
@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Sep 10, 2019
@stale stale bot removed the State: stale State: The issue / PR has no activity for >185 days label Sep 10, 2019
@benemorius
Copy link
Member Author

I'll push an update to this "soon". I forgot it had gotten outdated.

Copy link
Contributor

@benpicco benpicco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I now have some of these boards too!

The PR works in top of the current master branch and it's pretty straightforward.

Please rebase!

I'll look into the radio driver next.

.type = KINETIS_LPUART,
},
};
#define UART_NUMOF (sizeof(uart_config) / sizeof(uart_config[0]))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use ARRAY_SIZE(uart_config) now.

[6] = { .dev = ADC0, .pin = GPIO_UNDEF, .chan = 23, .avg = ADC_AVG_MAX },
};

#define ADC_NUMOF (sizeof(adc_config) / sizeof(adc_config[0]))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#define ADC_NUMOF (sizeof(adc_config) / sizeof(adc_config[0]))
#define ADC_NUMOF ARRAY_SIZE(adc_config)

@@ -0,0 +1,6 @@
# define the cpu used by the board
export CPU = kinetis
export CPU_MODEL = mkw41z256vht4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this board doesn't come with a programmer, I'd suggest also adding
export JLINK_DEVICE = MKW41Z256xxx4 for convenience. The Pin header on the board is after all compatible with e.g. JLink Edu Mini.

},
};

#define DAC_NUMOF (sizeof(dac_config) / sizeof(dac_config[0]))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#define DAC_NUMOF (sizeof(dac_config) / sizeof(dac_config[0]))
#define DAC_NUMOF ARRAY_SIZE(dac_config)

},
};

#define SPI_NUMOF (sizeof(spi_config) / sizeof(spi_config[0]))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#define SPI_NUMOF (sizeof(spi_config) / sizeof(spi_config[0]))
#define SPI_NUMOF ARRAY_SIZE(spi_config)

.sda_pcr = (PORT_PCR_MUX(3)),
},
};
#define I2C_NUMOF (sizeof(i2c_config) / sizeof(i2c_config[0]))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#define I2C_NUMOF (sizeof(i2c_config) / sizeof(i2c_config[0]))
#define I2C_NUMOF ARRAY_SIZE(i2c_config)

Comment on lines 65 to 74
{
.name = "IO_7",
.pin = IO_7_PIN,
.mode = GPIO_IN,
},
{
.name = "IO_8",
.pin = IO_8_PIN,
.mode = GPIO_IN,
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those are also used for I2C.
I had to remove those for i2c_scan to work.

@benpicco
Copy link
Contributor

I tested I2C, it works well too.
But since you export all GPIOs to SAUL, it will not work out of the box when SAUL is used - I'd trim down that saul_gpio_params[] array.

@PeterKietzmann
Copy link
Member

Very cool! The code seems to be in pretty good shape and I'll try to run some tests later today. Two small things I wondered while quickly scanning the PR:

  • A little more information about the board in the doc.txt would be nice. At least a hint about the need for an external programmer. Unless the transceiver PR is merged, we could mention this as well.
  • All the IO defines in board.h are not actually needed, are they? The default to access them should be GPIO_PIN() I guess

@PeterKietzmann
Copy link
Member

@benpicco how did you connect/flash the board? The Makefile expects a CMSIS-DAP by default. I tried to connect manually via JLink (EDU) without success. It is likely that I missed something.

@benpicco
Copy link
Contributor

I also used JLink EDU mini.
Just had to add export JLINK_DEVICE = MKW41Z256xxx4 to Makefile.include and it worked.

Mind that JLink does not provide 3.3V to the board, so you have to power it separately.

@PeterKietzmann
Copy link
Member

Mind that JLink does not provide 3.3V to the board

Ahja, forgot about that :-). So I attached a separate supply and got a little bit further but it seems there are some reset issues. Only executing JLINK_DEVICE=MKW41Z256xxx4 BOARD=kw41z-mini make flash results in:

### Flashing Target ###
/media/DATA/RIOT/examples/hello-world/bin/kw41z-mini/hello-world.elf is fine.
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Info : add flash_bank kinetis klx.flash
adapter speed: 1000 kHz
none separate
cortex_m reset_config sysresetreq
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Error: unable to find CMSIS-DAP device

So I tried to manually connect to the device which seems to have problems with the reset pin:

JLinkExe -device MKW41Z256xxx4
SEGGER J-Link Commander V6.44e (Compiled Apr  5 2019 16:16:27)
DLL version V6.44e, compiled Apr  5 2019 16:16:13

Connecting to J-Link via USB...O.K.
Firmware: J-Link V9 compiled Oct 25 2018 11:46:07
Hardware version: V9.30
S/N: 269307317
License(s): FlashBP, GDB
OEM: SEGGER-EDU
VTref=2.747V


Type "connect" to establish a target connection, '?' for help
J-Link>connect
Please specify target interface:
  J) JTAG (Default)
  S) SWD
  T) cJTAG
TIF>J
Device position in JTAG chain (IRPre,DRPre) <Default>: -1,-1 => Auto-detect
JTAGConf>
Specify target interface speed [kHz]. <Default>: 4000 kHz
Speed>
Device "MKW41Z256XXX4" selected.


Connecting to target via JTAG
InitTarget()
Connect Under Reset

**************************
WARNING: RESET (pin 15) high, but should be low. Please check target hardware.
**************************

Connect Under Reset

**************************
WARNING: RESET (pin 15) high, but should be low. Please check target hardware.
**************************

InitTarget()
Connect Under Reset

**************************
WARNING: RESET (pin 15) high, but should be low. Please check target hardware.
**************************

Connect Under Reset

****** Error: InitTarget(): PCode returned with error code -1

InitTarget()
Connect Under Reset

**************************
WARNING: RESET (pin 15) high, but should be low. Please check target hardware.
**************************

Connect Under Reset

**************************
WARNING: RESET (pin 15) high, but should be low. Please check target hardware.
**************************

InitTarget()
Connect Under Reset

**************************
WARNING: RESET (pin 15) high, but should be low. Please check target hardware.
**************************

Connect Under Reset

****** Error: InitTarget(): PCode returned with error code -1

Cannot connect to target.
J-Link>

Any suggestions?

@benpicco
Copy link
Contributor

To actually get the build system to use JLink you also have to add DEBUG_ADAPTER=jlink PROGRAMMER=jlink to the command line.

And in JLinkExe, select SWD, not JTAG.

If it still fails then, try rotating the connector 180° 😉

@PeterKietzmann
Copy link
Member

Thanks @benpicco!

  • Export of the build variables was done before, I just forgot to mention.
  • Using SWD within JLinkExe was a good point!
  • Rotating the connector was a good point too :-). One should not forget to check two sides of a cable...
  • I assume my OpenOCD is too old. I'm still on 0.10.0 release version. Are you on a recent build?
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Info : add flash_bank kinetis klx.flash
adapter speed: 1000 kHz
none separate
cortex_m reset_config sysresetreq
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Info : No device selected, using first device.
Info : J-Link V9 compiled Oct 25 2018 11:46:07
Info : Hardware version: 9.30
Info : VTarget = 3.240 V
Info : clock speed 1000 kHz
Info : SWD DPIDR 0x0bc11477
Info : MDM: Chip is unsecured. Continuing.
Info : klx.cpu: hardware has 2 breakpoints, 2 watchpoints
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* klx.cpu            cortex_m   little klx.cpu            halted
Info : MDM: Chip is unsecured. Continuing.
target halted due to debug-request, current mode: Thread 
xPSR: 0x21000000 pc: 0x0000073c msp: 0x1fffc200
auto erase enabled
Error: Unsupported K-series
Error: MCU is unsupported, SDID 0x41571004
Error: auto_probe failed

@benpicco
Copy link
Contributor

Yes, I complied OpenOCD from source - that is also needed for same54 and many other chips released around or after 2017.

@PeterKietzmann
Copy link
Member

Due to my flashing issues this morning I didn't manage to test that much. Right now I manually flashed the device using JLinkExe and so far I managed to:

  • let the LED blink via tests/leds
  • interact with the shell (UART) via examples/default
  • control the LED via SAUL

Nice to see these things work! I would provide some more tests next week during Hack'n'ACK

@PeterKietzmann PeterKietzmann removed the request for review from jia200x October 29, 2019 18:44
@MrKevinWeiss
Copy link
Contributor

MrKevinWeiss commented Oct 29, 2019

Can you please run the following: DEBUG_ADAPTER=jlink PROGRAMMER=jlink PORT=/dev/ttyUSB0 BOARD=kw41z-mini make reset flash term -C tests/periph_i2c/. No external device needs to be connected, only the board, I just want to see the error code.

Then in the shell run the following

i2c_acquire 0

i2c_write_byte 0 99 0 0

Please share your shell output because I am not getting an address NACK

My results
i2c_acquire 0
2019-10-29 19:47:52,431 - INFO # i2c_acquire 0
2019-10-29 19:47:52,432 - INFO # Command: i2c_acquire(0)
2019-10-29 19:47:52,432 - INFO # Success: i2c_0 acquired
> i2c_write_byte 0 99 0 0
2019-10-29 19:48:09,016 - INFO #  i2c_write_byte 0 99 0 0
2019-10-29 19:48:09,017 - INFO # Command: i2c_write_byte(0, 0x63, 0x00, [0x00])
2019-10-29 19:48:09,033 - INFO # Error: ETIMEDOUT [116]

@PeterKietzmann
Copy link
Member

PeterKietzmann commented Oct 29, 2019

ADC
With tests/periph_adc running I applied 0V and 3,3V to the ADC lines:

  • 0 - ok
  • 1 - ok
  • 2 - ok
  • 3 (PTB18) - not ok (same as DAC pin)

I did not test lines 4 - 6, did you?

DAC
With tests/periph_dac I got a sawtooth signal -> seems ok.

I had to figure out in the RM that the DAC connects to PTB18, so this seems to be a fixed setup right? Could you add a comment next to the configuration in periph_conf?

GPIO
With tests/periph_gpio:

  • Toggle PTA18 - ok
  • Toggle PTB18 - ok
  • Toggle PTC17 (MOSI labeled as MISO) - ok
  • Read PTC18 - ok
  • Interrupt on rising/falling/both edges PTC17 - ok

SPI
With tests/periph_spi:

  • Connect MISO to MOSI, SCK @ 1MHz, POL:0, PHASE:0 - received data that has been sent
  • With logic analyzer: SCK @ 400kHz, POL:1, PHASE:1 - looks ok and can be decoded by analyzer software

PWM
How comes there is no PWM implementation for kw41z?

I2C
Done by @MrKevinWeiss (fails, see above)

RTC & RTT
I ran tests/periph_rtc and tests/periph_rtt and by comparing the board outputs to the timestams provided by pyterm, everything looks ok.

Timer
tests/periph fails initializing the second timer. Is this just the shitty test case that can not handle the different timers available here (PIT and LPTMR)?

xtimer
With tests/xtimer_usleep:

Seems ok, see results
2019-10-29 18:51:49,973 - INFO # Running test 5 times with 7 distinct sleep times
2019-10-29 18:51:49,974 - INFO # Please hit any key and then ENTER to continue

p
2019-10-29 18:52:03,712 - INFO # Slept for 9979 us (expected: 10000 us) Offset: -21 us
2019-10-29 18:52:03,766 - INFO # Slept for 49988 us (expected: 50000 us) Offset: -12 us
2019-10-29 18:52:03,780 - INFO # Slept for 10254 us (expected: 10234 us) Offset: 20 us
2019-10-29 18:52:03,842 - INFO # Slept for 56794 us (expected: 56780 us) Offset: 14 us
2019-10-29 18:52:03,859 - INFO # Slept for 12146 us (expected: 12122 us) Offset: 24 us
2019-10-29 18:52:03,963 - INFO # Slept for 98786 us (expected: 98765 us) Offset: 21 us
2019-10-29 18:52:04,044 - INFO # Slept for 75012 us (expected: 75000 us) Offset: 12 us
2019-10-29 18:52:04,057 - INFO # Slept for 9979 us (expected: 10000 us) Offset: -21 us
2019-10-29 18:52:04,112 - INFO # Slept for 50018 us (expected: 50000 us) Offset: 18 us
2019-10-29 18:52:04,126 - INFO # Slept for 10224 us (expected: 10234 us) Offset: -10 us
2019-10-29 18:52:04,187 - INFO # Slept for 56793 us (expected: 56780 us) Offset: 13 us
2019-10-29 18:52:04,206 - INFO # Slept for 12116 us (expected: 12122 us) Offset: -6 us
2019-10-29 18:52:04,309 - INFO # Slept for 98755 us (expected: 98765 us) Offset: -10 us
2019-10-29 18:52:04,388 - INFO # Slept for 75012 us (expected: 75000 us) Offset: 12 us
2019-10-29 18:52:04,404 - INFO # Slept for 10010 us (expected: 10000 us) Offset: 10 us
2019-10-29 18:52:04,457 - INFO # Slept for 50019 us (expected: 50000 us) Offset: 19 us
2019-10-29 18:52:04,472 - INFO # Slept for 10254 us (expected: 10234 us) Offset: 20 us
2019-10-29 18:52:04,535 - INFO # Slept for 56793 us (expected: 56780 us) Offset: 13 us
2019-10-29 18:52:04,550 - INFO # Slept for 12115 us (expected: 12122 us) Offset: -7 us
2019-10-29 18:52:04,655 - INFO # Slept for 98785 us (expected: 98765 us) Offset: 20 us
2019-10-29 18:52:04,735 - INFO # Slept for 74982 us (expected: 75000 us) Offset: -18 us
2019-10-29 18:52:04,749 - INFO # Slept for 9979 us (expected: 10000 us) Offset: -21 us
2019-10-29 18:52:04,803 - INFO # Slept for 50018 us (expected: 50000 us) Offset: 18 us
2019-10-29 18:52:04,820 - INFO # Slept for 10224 us (expected: 10234 us) Offset: -10 us
2019-10-29 18:52:04,880 - INFO # Slept for 56793 us (expected: 56780 us) Offset: 13 us
2019-10-29 18:52:04,896 - INFO # Slept for 12116 us (expected: 12122 us) Offset: -6 us
2019-10-29 18:52:05,001 - INFO # Slept for 98785 us (expected: 98765 us) Offset: 20 us
2019-10-29 18:52:05,083 - INFO # Slept for 74982 us (expected: 75000 us) Offset: -18 us
2019-10-29 18:52:05,095 - INFO # Slept for 9979 us (expected: 10000 us) Offset: -21 us
2019-10-29 18:52:05,152 - INFO # Slept for 49988 us (expected: 50000 us) Offset: -12 us
2019-10-29 18:52:05,167 - INFO # Slept for 10223 us (expected: 10234 us) Offset: -11 us
2019-10-29 18:52:05,226 - INFO # Slept for 56794 us (expected: 56780 us) Offset: 14 us
2019-10-29 18:52:05,243 - INFO # Slept for 12115 us (expected: 12122 us) Offset: -7 us
2019-10-29 18:52:05,347 - INFO # Slept for 98755 us (expected: 98765 us) Offset: -10 us
2019-10-29 18:52:05,431 - INFO # Slept for 75012 us (expected: 75000 us) Offset: 12 us
2019-10-29 18:52:05,434 - INFO # Test ran for 1730347 us

@benpicco
Copy link
Contributor

The I2C bug shouldn't be related to the board though, that's in kinetis/periph/i2c.c: -ETIMEDOUT is the only error code that i2c_write_bytes() will return.

The basic I2C config for this board is valid (when ignoring some pins doubling as saul gpio).

@benpicco
Copy link
Contributor

@benemorius ping 😉

@MrKevinWeiss
Copy link
Contributor

MrKevinWeiss commented Nov 25, 2019

The I2C bug shouldn't be related to the board though, that's in kinetis/periph/i2c.c: -ETIMEDOUT is the only error code that i2c_write_bytes() will return.

The basic I2C config for this board is valid (when ignoring some pins doubling as saul gpio).

static int i2c_tx_addr(i2c_t dev, uint8_t byte)
{
    I2C_Type *i2c = i2c_config[dev].i2c;
    TRACE("i2c: txa: %02x\n", (unsigned)byte);
    i2c->D = byte;
    uint8_t S;
    uint16_t timeout = UINT16_MAX;
    do {
        S = i2c->S;
    } while (!(S & I2C_S_IICIF_MASK) && --timeout);

    i2c_clear_irq_flags(i2c);

    int res = 0;
    if (S & I2C_S_ARBL_MASK) {
        DEBUG("i2c: arbitration lost\n");
        res = -EAGAIN;
    }
    else if (timeout == 0) {
        /* slave stretches the clock for too long */
        DEBUG("i2c: tx timeout\n");
        res = -ETIMEDOUT;
    }
    else if (S & I2C_S_RXAK_MASK) {
        DEBUG("i2c: NACK\n");
        res = -ENXIO;
    }
    if (res < 0) {
        bit_clear8(&i2c->C1, I2C_C1_MST_SHIFT);
        i2c_state[dev].active = 0;
        i2c_clear_irq_flags(i2c);
    }
    return res;
}

i2c_write_bytes calls i2c_start which calls the i2c_tx_addr that has the expected -ENXIO error code.

It seems like timeout happens on when the while (!(S & I2C_S_IICIF_MASK) && --timeout); condition is not met. This should not happen in normal operation. Ideally the NACK should occur which is the -ENXIO error code.

With the BOARD=frdm-kw41z make flash term -C tests/periph_i2c/ on the most recent master I have the following expected results:

> i2c_write_bytes 0 85 0 0
2019-11-25 09:15:11,337 #  i2c_write_bytes 0 85 0 0
2019-11-25 09:15:11,342 # Command: i2c_write_bytes(0, 0x55, 0x00, [0x00])
2019-11-25 09:15:11,344 # Error: ENXIO [6]

If this gets merged please raise an issue on this and I will attend to it when I have time.

EDIT:
I did acquire before, just forgot to copy it in...

@MrKevinWeiss
Copy link
Contributor

My apologies, it seems like there is no internal pullups in the port. This means that the external pullups are needed (and not provided with the board). Maybe make a note on the board documentation or something because the requirement are different from the frdm-kw41z board. Either way I2C should pass.

@PeterKietzmann
Copy link
Member

@MrKevinWeiss thanks for investigating on the I2C issue!

@benemorius the PR looks good but there are some changes and checkups needed:

  • Address suggestions from @benpicco
  • Check what is wrong with ADC 3 (on PTB18)
  • Check what is wrong with tests/periph
  • Add a doc.txt file that points out basic information about programming the device, yet missing transceiver support, and I2C relying on external pull-up resistors

@benemorius
Copy link
Member Author

The deal with the nonworking ADC input is that the kinetis ADC peripheral has an extra mux to switch between two sets of mostly-overlapping inputs. Currently we don't handle that configurability in the driver and it's just hardcoded to the B inputs whereas this board needs (and all 4 ADC inputs work with) the A inputs selected. Verified with this hack: sed -i 's/ADC_CFG2_MUXSEL_MASK/0/' cpu/kinetis/periph/adc.c. (page 576, kw41z reference manual)

I don't know the reason for the timer test failing. I know both timers work. I'll investigate.

@benpicco
Copy link
Contributor

benpicco commented Feb 5, 2020

Murdock also found some issues.

@benemorius
Copy link
Member Author

Murdock also found some issues.

Thanks I expected it to I just needed to see how close I was getting. I'm working on addressing everything now.

@benemorius
Copy link
Member Author

The reason kw41z doesn't have PWM yet is because most other kinetis use a FlexTimer peripheral for PWM whereas others like kw41z use a standard PWM peripheral and the driver only supports FTM not PWM peripherals. I have an implementation that supports PWM that I need to clean up and PR.

@benemorius
Copy link
Member Author

The periph_timer test is failing on the second timer because it's an LPTIMER which can't run as fast as 1 MHz. The test has a list of boards needing 32 kHz timers that I can add this board to. It passes after that.

@benemorius benemorius force-pushed the kw41z-mini branch 2 times, most recently from 9d968cf to e1a7bb9 Compare February 6, 2020 03:19
@benemorius
Copy link
Member Author

Just a few more things to address I think.

@benemorius benemorius force-pushed the kw41z-mini branch 2 times, most recently from 2a45776 to ee0ff40 Compare February 12, 2020 20:54
@benemorius
Copy link
Member Author

I think that's everything addressed.

Hopefully the notes in the doc file are adequate for the points that were brought up. Let me know what to improve otherwise.

Copy link
Contributor

@benpicco benpicco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!
I noticed a few quirks, but this seems pretty polished.

Comment on lines 101 to 102
Raspbian has an old version of gcc-arm-none-eabi as of this writing
and it's recommended to install a newer version for compiling RIOT.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What version is that?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well it's 2018-q2-6 which isn't that old but I just noticed it's older than what I'm using regularly so it seemed worth mentioning. In any case I think it's always good advice to use the latest version if it's a really modern cpu. I don't have a specific recommendation I just noticed it's old.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes but please add the version number to the comment.
The code will still be there in 5 years and then raspbian hopefully ships a newer version ;)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw: Ubuntu ships the same version and I had no trouble compiling RIOT for any ARM controller with that yet.
Why would kw41z be special here - or rather, what issues are you experiencing?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh cool thanks for mentioning that. I was just about to reply that I couldn't find any actual issues and I'm content to not have this remark.

My only reservation was that it's different from the configuration that I've generally tested. I think I'll wrap up testing and proceed to remove the remark.

@benpicco benpicco added the Reviewed: 3-testing The PR was tested according to the maintainer guidelines label Feb 16, 2020
Copy link
Contributor

@benpicco benpicco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried it and it's working fine.
Code looks good too - just ether extend that comment about arm-none-eabi-gcc or drop it entirely if it's not needed anymore.
Feel free to squash directly.

@benemorius
Copy link
Member Author

just ether extend that comment about arm-none-eabi-gcc or drop it entirely if it's not needed anymore.

I couldn't recreate any issues so I dropped it.

@benpicco benpicco merged commit 23c5d34 into RIOT-OS:master Feb 28, 2020
@benemorius
Copy link
Member Author

Thanks very much for the review and testing!

@benpicco
Copy link
Contributor

benpicco commented Mar 1, 2020

Are there two versions of the board?
I just tired another board because I though one might have a problem with the antenna, but there I had to do

--- a/boards/openlabs-kw41z-mini/Makefile.features
+++ b/boards/openlabs-kw41z-mini/Makefile.features
@@ -1,5 +1,5 @@
 CPU = kinetis
-CPU_MODEL = mkw41z512vht4
+CPU_MODEL = mkw41z256vht4
 
 # Put defined MCU peripherals here (in alphabetical order)
 FEATURES_PROVIDED += periph_adc

for it to print anything over UART.

M41W 9VT4 1N16S CTHHQP

IMG_20200301_164513

M41W 8VT4 1N16S CTDFMD

IMG_20200301_164417

@benemorius
Copy link
Member Author

8VT4

I'm sorry I thought I had reached out to everyone who got any of those to replace them.

What happened is NXP reduced the price of the 512k chip and it didn't make sense to use the 256k chip anymore. So only the early boards have the 256k chip and rather than support them both I thought it easier to just find and replace the few boards that have 256k chips.

But obviously I didn't manage to get them all back and I'm so very sorry for the confusion and trouble. If it's ok, can you email me a shipping address and tell me how many of the 256k boards you have so I can replace them with 512k boards?

@benpicco
Copy link
Contributor

benpicco commented Mar 1, 2020

Don't worry, you've already sent me four boards when I ordered two (2x r2 and 2x r1.2 of which one is the 256k version. They had bent JTAG pins which I managed to unbent and then just used those as a had a fitting adapter - thank you for the freebies 😄)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: boards Area: Board ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Reviewed: 3-testing The PR was tested according to the maintainer guidelines Type: new feature The issue requests / The PR implemements a new feature for RIOT
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants