BASEPRI setting after reset
Board: Riverdi display with STM32H757XIH6 MCU; using TouchGFX and FreeRTOS
I think I know how BASEPRI register works and how it is used in FreeRTOS. What I do not know is where is the value of BASEPRI register set at the beginning of the program. I noticed that before the start of FreeRTOS scheduler, it is at the value configMAX_SYSCALL_INTERRUPT_PRIORITY. Right after reset, it is at zero as I would expect. In the call to the main() function it as already at the configMAX_SYSCALL_INTERRUPT_PRIORITY value. I stepped the startup assembly code and before call to the
__libc_init_array
function it is 0, after this call it is at that higher value. This function should not change this register, right? I think it does some library initialization and I cannot step its code.
I think that this behavior may have changed with the latest HAL, as on our other board with STM32H723 and older HAL, it was zero always from the reset on.
My main question is if it is okay to just call
vPortSetBASEPRI(0);
function after system initialization and before FreeRTOS scheduler start. I need to do this since I am loading some SPI configuration from EEPROM and I need this done before FreeRTOS starts.
Thanks.