App works when xruning but not when xflashing (SOLVED)

Technical questions regarding the XTC tools and programming with XMOS.
Post Reply
User avatar
atena
Member
Posts: 12
Joined: Fri Apr 25, 2014 3:35 pm

App works when xruning but not when xflashing (SOLVED)

Post by atena »

Hello!

I am trying to drive a laser range finder with an UART on a XS1-L16-128. I use XS1_PORT_1E port for RX and XS1_PORT_1A for TX.

I am suffering a really strange thing. My application works PERFECTLY fine when I just run it, however, if I flash the app into my XMOS it gets stuck and the application does not execute as it should and as it did when running.

As far as I know, the UART starts ok but it hangs after a first command is sent. Same for other operations, (checked with LEDs), they hang after some time of operation.

Any ideas?
:)
Thanks on advance!
Last edited by atena on Mon May 12, 2014 10:39 am, edited 1 time in total.


User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am
Contact:

Post by infiniteimprobability »

Which hardware are you running on?

If it is the slicekit then you may want to check you have set the SPI mux properly (controlls access to ports 1A - D).. Might be causing Rx to not be routed out to the headers..
User avatar
atena
Member
Posts: 12
Joined: Fri Apr 25, 2014 3:35 pm

Post by atena »

Thanks for the answer!

I am using SOMANET hardware. But that is fine, it basically consists on 2 XDLinked L16 and the ports are correctly configured. As I said, the app works perfectly when running, and it is the same HW configuration that when flashed.
User avatar
atena
Member
Posts: 12
Joined: Fri Apr 25, 2014 3:35 pm

Post by atena »

Solved,

it apparently takes longer to initialise the UARTs when booting from the flash, so introducing a delay before the range finder thread starts solves the problem.
User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am
Contact:

Post by infiniteimprobability »

Glad it's fixed! Thanks for posting your solution.
Post Reply