AnsweredAssumed Answered

Bugs in Kwikstik BSP

Question asked by Enrico Schröder on Mar 9, 2012
Latest reply on Mar 20, 2012 by Enrico Schröder

Hello there,

 

I'm using MQX 3.8 with a Kwikstik.  

 

I found a couple of bugs in the board support package:

 

1) The function init_hardware() in init_hw.c is not called during initialization. I assume it's part of the board/cpu initialization and should be called automatically. Otherwise one gets all kinds of strange behaviour:

- GPIO port clocks are not enabled -> HARD_FAULT when using certain drivers (ADC for example)

-  _time_delay() does not work correctly (delay too long)

- maybe others, which I did not stumble upon

 

2) _bsp_channel_io_init() in init_gpio.c uses wrong ADC_SOURCE_MODULE parameter. In line 356 (ADC_GET_MODULE(source) == ADC_SOURCE_MODULE(0)) it uses 0, but this should instead be ADC_SOURCE_MODULE(1) to correspond with defines in adc_mk40.h. 

 

Took me two days to find those bugs, so I'm posting them here so that others can safe that time (and hoping that they get fixed in the next release)

 

 

Outcomes