TREK1000 init problem

Hi,
I have problem with re programming TREK1000. After uploading bin file on board and reset, on screen I can see the first message about software version, all LEDs next to switches blink several times and then turn off. Then, only one red LED in the center of the board is turn on (I believe it shows power on). And that’s it, I can’t see second message on screen with anchor ID and LEDs 5-7 and 3-4 don’t blink. I think that program is blocked in init part and doesn’t get to main loop.
I am using software which is slightly changed by my ex-coworker, the project was moved to me after he quit. I believe he was using the same code and it worked earlier.
Did any of you come across similar issue?
I don’t know if I need to look for some reason of it in code, or maybe this is caused by switch configuration or something else.
I’m beginner with this software and I don’t even know where I need to look for some problem in the code.
Thanks in advance,
Grzegorz

Hi, Do you have the original .bin files , eg version 2.25 or 2.10 so you can program the boards with them to see if the boards are ok.
Add if you have a TREK, you would have 4 boards (or would you have 2 EVK sets).
ALso have look at the TREK User Manual or the TREK Quick Start Guide (attached) to double check the switch settings TREK1000 - Quick Start Guide - v1.5.pdf (1.0 MB)
Leo

Thanks for quick response Leo.
I have original Decawave bin files, I checked it and it works fine, so boards should be ok.
I’ve done some debugging and program blockes on sprintf function, but only when it have % in it.
In definition of setLCDline1 for example:
When I type: sprintf((char*)&dataseq[0], “DecaRangeRTLS C2”); it works fine.
But when I type: sprintf((char*)&dataseq[0], “DecaRangeRTLS C%d”, chan); the program blocks on this function. chan is int variable, so %d seems fine.
In original project there is s1switch & SWS1_SHF_MODE, but my ex co-worker rely on typing device address and mode directly into code and didn’t rely on switch configuration.
I tried easy solution like this:
if(chan == 2)
{
sprintf((char*)&dataseq[0], “DecaRangeRTLS C2”);
}else sprintf((char*)&dataseq[0], “DecaRangeRTLS C5”);
and it works, but then program blocked when I turned on a tag, and tag’s ID and distance should appear on screen. So program blocked again on:
495: sprintf((char*)&dataseq1[0], “A%d T%d: %3.2f m”, ancaddr, toggle, rangetotag);
and it looks the same like in original project.
Do you have some advice what to do to fix that or where should I looking for, Leo?

Hi ,

The issue is the sprint() function. You should check this function which is in the libraries you’re using as the issue has nothing to do with UWB radio, but could be to do with your compiler, library.

You could perhaps test the syntax using a simple “Hello World” or “Stay Safe” program with printing to run.

Leo

Yes, it was wrong version of compiler. Don’t know why, but some of functions from stdio.h in newer versions of GNU Toolchain were not working. But when I installed 4.8 version it worked.
Issue solved, thanks Leo