2024-05-15 08:17 AM
I'm trying to use HSEM for my first time with a H750 mcu and i'm unable to get/take a free semaphore.
I'm using the following HALL_HSEM_FastTake function. Line 210 operation always returns false and it makes sense returning false.
HSEM_CR_COREID_CURRENT is 0x300, HSEM_RLR_LOCK is 0x80000000 and RLR struct with all semaphores is always 0. The OR operation between the two macros is always different than 0...
Is this function implementation ok? Or I'm not understanding how HSEM should be used?
Solved! Go to Solution.
2024-05-17 06:09 AM
Found the solution.
1- I didn't understand the documentation properly. RLR struct is set when being read.
2- CubeMX don't display a setting to enable HSEM. So I had to do it myself with __HAL_RCC_HSEM_CLK_ENABLE();
2024-05-17 06:09 AM
Found the solution.
1- I didn't understand the documentation properly. RLR struct is set when being read.
2- CubeMX don't display a setting to enable HSEM. So I had to do it myself with __HAL_RCC_HSEM_CLK_ENABLE();