2022-11-14 01:57 AM
Hello, i just bought a STM32WL55JC2. It's working perfectly on Arduino but i want to use the LORA module and Arduino doesn't support it.
I've configured my stm on CubeMX and tried a basic HAL_GPIO_WritePin but it doesn't work and i can't figure why.
Arduino working code :Thank you :)
Solved! Go to Solution.
2022-11-14 07:56 AM
check: did you
x set free pins as analog ?
+
to test : just write
GPIOB->MODER = 0x55555555 ;
while ....set pin .... .
2022-11-14 04:37 AM
why only download ?
try : debug and you can see the port registers , when you step in your prog.
2022-11-14 06:02 AM
@AScha.3 I can't figure which register is attached to my LEDs ? Thank you
edit : r1 and r2 have changed for 512 after 1 while loop
2022-11-14 06:09 AM
The registers in the GPIOB peripheral, ie GPIO->ODR
And the clocking of the GPIOB via the RCC peripheral
2022-11-14 06:16 AM
Thank you, where do i check the GPIO->ODR state in the debug mode ?
2022-11-14 06:22 AM
In Keil I'd open a Peripheral View
2022-11-14 06:44 AM
there is a problem with the BSRR right ?
i tried to change manually the register ODR but it still doesn't work
2022-11-14 06:50 AM
No idea what board you're using or if the LEDs illuminate when LOW rather than HIGH.
BSRR is supposed to be a write-only means of changing ODR, ie single action rather than RMW at a software level.
2022-11-14 06:53 AM
BSRR is write only. so nothing to read!
and ODR shows ffff , what you write in. so whats wrong ??
2022-11-14 07:01 AM
if my gpiob->ODR shows ffff the led on my board should be turned on right ?