2023-01-05 07:09 AM
How to test only the HAL_Delay (...).
Thank you for your helps
Regards
2023-01-05 07:16 AM
Check the operation of SysTick_Handler() using the debugger. Make sure it fires correctly. If not - check what you did wrong (disabled all interrupts, misconfigured SysTick).
2023-01-05 09:22 PM
Well if I had to guess, you're probably calling HAL_Delay from an interrupt, which will not work.
2023-01-06 01:29 AM
Hi,
I don't know if I use with interrupt this function HAL_Delay but It's the summary of my configuration
On the other hand, I can see the SysTick of my configuration is not configured
yet my Clock is configured, I probably missed a step. Do you know if I can find information how to activate SysTick ?
I think when you configure when you configure the Clock the SysTic is automatically configured.
Thank you for your advices
Regards
2023-01-06 05:16 AM
Hi,
After some changes, now I think my I2C does not work correctly. In this prototype :
The HAL_I2C_Master_Transmit return an error, probably for the same reasons. Do you know where I can find examples with I2C ?
Thank you for your helps.
Regards
2023-01-06 05:39 AM
It could mean that the I2C slave address is invalid or a physical connection issue. You should see what the txResponse value is. Is that where the HAL_Delay is stuck? And why is a 1ms delay needed in that write function?
Also, your write function is a void and you are trying to return HAL_ERROR. The compiler should have gave you a warning about that..
You can find examples in your repository
C:\Users\<user name>\STM32Cube\Repository
2023-01-06 05:48 AM
Hi,
Thank you, yes I have a number of error is 1, but what does that mean ? I don't know.
Yes I have a warning but I don't know how to return a value. For the hardware (wiring and component address, all is correct). I think it comes from the Clock or SysTick. In fact the I2C need theses parameters.
I'll look at the example you gave me.
Thank you
2023-01-06 07:14 AM
Hi,
After browsing the directory I couldn't find the I2C example with my evaluation board.
Probably I have to look elsewhere.
2023-01-06 09:32 AM
You can use the Nucleo example. It is the same Microcontroller.
C:\Users\<suer name>\STM32Cube\Repository\STM32Cube_FW_L5_V1.5.0\Projects\NUCLEO-L552ZE-Q\Examples\I2C
Also, i'm not sure what I2C device you're trying to write to but if it's a 16 bit register then you're not writing the value to your buff array correctly.
2023-01-08 11:48 PM
Hi,
I can see sevaral example but I don't know which file corresponds to my evaluation card ?
Probably I2C_TwoBoards_ComPolling may suit my needs ?
Thank you