-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
Description
- Type: Enhancement
- Related issue: C030 boards fail new platform critical section test #5995
- Priority: Blocker
The UBLOX_C030
series targets require that a voltage level in a chip on the board is configured during boot for reliable operation. This configuration has to be performed over I2C. The [ST standard] I2C drivers used on this target make calls to wait_us()
during I2C read and write requests; this is a sensible thing to do since the RTOS can run other tasks while waiting. However, since wait_us()
is an RTOS call, this means that the I2C [HAL] API cannot be called from HAL_MspInit()
, the target configuration hook function, as the RTOS is not initialised at that point.
Hence we need a hook that can be used by target code after RTOS initialisation. I think that this will be a generally useful feature to have as there will be other cases where targets need configuration of items that are not as simple as a register.
FYI, we proposed using mbed_main()
for this purpose in #6023 but we now understand that this is for user code and not for target code.