cancel
Showing results for 
Search instead for 
Did you mean: 

LED1/2/3 working on arduino but not on CUBEMX

BNamu.1
Associate II

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.

0693W00000WIFX9QAP.jpg0693W00000WIFXiQAP.jpgArduino working code :0693W00000WIFROQA5.jpg0693W00000WIFXdQAP.jpgThank you 🙂

14 REPLIES 14
AScha.3
Chief II

yea, but i see: _MODER shows 0xFFFF... -> pins are on analog mode !!!!! so no hi/lo output.

where you set it analog? check!

If you feel a post has answered your question, please click "Accept as Solution".
BNamu.1
Associate II

0693W00000WIHuyQAH.jpgi generated the code automatically so i didn't change anything. I don't know how to change this.

AScha.3
Chief II

check: did you

0693W00000WIIGBQA5.png 

x set free pins as analog ?

+

to test : just write

GPIOB->MODER = 0x55555555 ;

while ....set pin .... .

If you feel a post has answered your question, please click "Accept as Solution".
BNamu.1
Associate II

Nop this parameter isn't enable. BUT with GPIOB->MODER = 0x55555555 ; my led is now working !!! Thank youu, i still don't know why my pins are on analog mode but it's fine

AScha.3
Chief II

ok, not fine , but we got it going.

there is some instruction doing this - or is an error in Cube/HAL , then you should set pins yourself and not trust in HAL . (it has some errors, shure.)

+

 When your question is answered, please close this topic by choosing Select as Best.

If you feel a post has answered your question, please click "Accept as Solution".