RAK3172 Debugging Error

Hello everyone,

New user here, and really this is my first time messing with the RAK3172 Evaluation Board at all. I’ve been stuck on this one issue where I am assigning a value to a variable which was for sure initialized to 0, but when I assign the value, it becomes a gibberish number that will not let me assign any value at all. The other variables to which I was assigning values worked perfectly fine.

Then, after messing around with values and print statements, the entire chipped stopped functioning or even being detected on the serial port. Plugging the chip in to an STLink v2 it only connects under hotplug mode (unsure if this is important), and when trying to read the MCU core it only states “Error: Data Read Failed.” I decided to try the Fault Analyzer to see if that gets anywhere, and when I try to run it, the only output is “Error: Cannot Read Cortex Registers.”

I have attempted to look up these errors but could not find anything, so I figured someone here knows much more than me. These issues are making me lean towards a bad chip, but again I wouldn’t know if I was missing something simple or obvious.

The code is simply accessing a public member in a class I created for the RAK3172 and writing a value to it. When the board did work, all the other members would work perfectly fine, except for this one value. I believe it is NULL as the value would change every time I rebooted the board; however it would always look something like “1675123461.” Comparing it to NULL by checking equality would yield true. It would also pass later if statements which checked if the value was in between +/- 2 (this is for a pressure sensor) which should have failed. Like I said earlier, I am a new user so I can only include one screenshot, so I just included the code. The first print would say 0 which is correct, the check would return true, and then the next print after the assignment would return the NULL value.

Thank you all for your time.

image

For a quick update,

The reading of the CPU and other things like that was my fault, I forgot to connect the VDD pin on the st-link, however the board itself is still not doing anything

Welcome to RAK forum @dirkt68

The gibberish value you have in rakDevice.m_pressureRaw is caused by using "%d\n" instead of "%f\n".Can you double check what data type you expect if a float or an integer? Because %d is only for integers.

The seconds issue you have on failure of response of RAK3172 is probably caused not by that but by persistent experimenting to figure out why it is happening.

I suggest to upload again a fresh HEX firmware of RAK3172 by using STM32CubeProgrammer either via UART or STLINK. I go first with UART since it is more simple. You have access on the BOOT0 in your board. If nothing is happening, that’s the time I use STLINK.

We created a guide here for that STM32CubeProgrammer Guide for RAK Modules | RAKwireless Documentation Center.

The RUI3 FW is here RAK3172 WisDuo LPWAN Module Datasheet | RAKwireless Documentation Center

Thank you so much for your help, I can’t believe I forgot to use the correct format string after messing with it all this time. The HEX file idea also worked perfectly with the ST-Link

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.