2022-07-08 03:09 AM
Hello,
After prototyping with a Nucleo STM32WLJC, I start to use LoRa-E5 board from Seedstudio with a STM32WLE5 MCU.
I want to make a P2P communication, so I'm trying to make a ping pong project on this board.
I tried starting from seeds LoRaWan exemple, from ST pingpong exemple and also from this repo project and .ioc file(https://github.com/danak6jq/Seeed-LoRa-E5).
But It's not working...
After debuging I find out that in SUBGHZSPI_Transmit function, a timout error occured while waiting for TXE flag to be set.
I can't find any others exemples to compare the configuration...
Does anyone have a idea about whats happenning ? Or a tips that can make me move forward ?
Thanks
Hugo
2023-10-26 05:00 AM
Timing is definetely not the case.
I have about 120 custom boards based on STM32WLE5CC and about 20 of them have this issue. The MCU fails the very first call to SUBGHZSPI_Transmit() with HAL_SUBGHZ_ERROR_TIMEOUT due to the same line of HAL code and SPI_SR_TXE flag not being set.
The very same binary code works perfectly on the rest 100pcs.
I even took two brand new STM32WLE5CC chips from the tray an soldered them in place of broken.
Guess what? They are not working too! There is something with the PCB maybe.
No idea what to check further. I'm stuck for now
2023-10-26 05:10 AM
TXE not going high is suggestive of a clocking issue, does it work a few time then stop or does it never work?
Is there some error or other status reflected by SPI->SR? Some DMA or IRQ servicing it? Are other SPI registers all zero?
2023-10-26 05:13 AM - edited 2023-10-26 05:16 AM
Dump RCC and SPI registers, and any other salient registers, in the failing cases, but also how they look in the working ones.
Provide some way to compare and contrast, or bisected the issue.
Look for failure earlier, the cause may be in initialization of clocks, pins or peripheral. Work the symptoms back to a cause, or other observable diversion of behaviour.
2023-10-28 03:08 AM - edited 2023-10-28 03:55 AM
Thank you for your reply!
Seems I have to sacrifice another chip to check if it works at least once before death. I've never tried to debug from the clean MCU.
Regarding registers. I've dig a bit deeper and found out that the issue starts with SUBGHZ SPI clock enable.
2023-12-16 07:31 PM
I also have the same timeout problem. Did anyone find a solution? WIO E5 was working fine, now it just stopped working and always just gets the SUBGHZSPI_Transmit() HAL_SUBGHZ_ERROR_TIMEOUT errors. I have a 2nd module, it's still working fine with the same code.
2023-12-17 12:45 AM
As I wrote in another thread my assumption is that there possible VDD spikes are over the limit.
What I do now if I encounter a dead radio is:
desoldering MCU, checking VDD, replacing DC-DC or it's resitor divider if there is any sign of possible voltage over 3.6V and soldering another STM32WLE5 in place.
This procedure had no failures yet.
2023-12-17 05:05 AM
Ok thanks for getting back to me, sounds like there's no way to fix it after it has gone bad. What's strange is that in the debugger, the SUBGHZ SPI registers all show up as 0 and never change when writing to them, and they always read back as 0. Writing anything to SPI registers in APB3 (0x58010000 region) does nothing. So it's an issue on the APB3/PCLK3 bus, before it even gets to the radio. I'm way under the 16Mhz max limit, so it shouldn't be an overclocked issue that has damaged it.
2023-12-20 02:18 AM - edited 2023-12-20 02:34 AM
My storie...
First for unknown reason the stlink can't erase the flash and can't reprog the STM32WL (MI error ...) the core appear to be locked. With the stmprogrammer i had to unlock the device (which came after 4 attempts...) I finaly can reprogram the stm32WL but on the second attempt i had this error and the TX was inopperent. Soon after the STM32WL does not accept anything anymore the STLink report that the device stay in reset -> i undertand it is dead.
The only reason i found is the vicinity of a 5W RF source sending short burst for testing.
JP
Correction :
The chip is not dead it is locked option byte RDP read FF
After unlock still have the error HAL_SUBGHZ_ERROR_TIMEOUT reported after SUBGHZSPI_Transmit ??
2023-12-20 03:17 AM
If your RDP is FF and seems like it's dead and can't remove RDP or change user option bytes, try check this thread:
Try set RDP to AA, then BB, then AA but you need to power cycle between each one (a reset is not enough, must completely remove power between each change). And at the end you might need to set all the user options back to their defaults "on" (except the last one) after you get it going again.
I wonder if the issues are related? The chip I have with the HAL_SUBGHZ_ERROR_TIMEOUT error is the same one I had with the RDP issue. But I didn't take notice if the HAL_SUBGHZ_ERROR_TIMEOUT error started before or after the RDP issue, so I'm not sure.
2023-12-20 03:36 AM
Hi,
I have successfully unlock the chip but second question is why it is locking.
I have made many debug session,may be 100 or 200, on 3 differents projects whitout problem.
Those 2 errors arrive at the same time, may they are related may be not ???