Now we are treading new ground for me.
As far as I know if you "Run As Xcore Application" it does not matter what is in the flash.
So, I was very brave and tried something dangerous. I erased all of my flash!
Like so:
xflash --id 0 --erase-all --target-file ../XC-1A.xn --noinq
Sure enough using a terminal program and power cycling my dev board shows there is no output.
Then I run the uart as Xcore application from the XDE and it works.
Then I write it to flash and it works again in my terminal from power up.
I'm running out of ideas here...
UART won't run
-
- Respected Member
- Posts: 296
- Joined: Thu Dec 10, 2009 10:33 pm
-
- Active Member
- Posts: 35
- Joined: Tue Mar 08, 2011 12:58 pm
Hi
I tried to erase my device..
Then programming it as een XCore Application doesn't work either..
if I program it in the flash.. I can't see the outcome in the XDE, right?
Ganux_
I tried to erase my device..
Then programming it as een XCore Application doesn't work either..
if I program it in the flash.. I can't see the outcome in the XDE, right?
Ganux_
-
- Respected Member
- Posts: 296
- Joined: Thu Dec 10, 2009 10:33 pm
When I program to flash I cannot see it running in the XDE console. Only if I run as xcore application.
I can see the program running from flash if I connect with terminal program like GtkTerm instead.
One thing, did you ever see a normal printf output working?
Your loop at initialization time does not look right. It has no timing in it and so the output will not be high for 10 bits.
I can see the program running from flash if I connect with terminal program like GtkTerm instead.
One thing, did you ever see a normal printf output working?
Your loop at initialization time does not look right. It has no timing in it and so the output will not be high for 10 bits.
-
- Active Member
- Posts: 35
- Joined: Tue Mar 08, 2011 12:58 pm
Hi,
added the timer.. even to do it for every bit sent..
but still nothing.. :(
Tried the printf.. added following line:
printstr("Hello World ;-) /n");
included the print.h
and i got the output!! (even with the '/n')
after that the same squares from the UART :(
Ganux_
added the timer.. even to do it for every bit sent..
but still nothing.. :(
Tried the printf.. added following line:
printstr("Hello World ;-) /n");
included the print.h
and i got the output!! (even with the '/n')
after that the same squares from the UART :(
Ganux_
-
- Respected Member
- Posts: 296
- Joined: Thu Dec 10, 2009 10:33 pm
Grrrr...
It is possible that, for some strange reason, your bit time is being set wrongly.
Getting an output shows it works but getting garbage characters is often a sign of the wrong baud rate.
As an experiment try setting the bit time directly:
#define BIT_TIME 868
Which works here.
By the way, how did you find out that the baud rate to use is 115200? I could not find a reference to that anywhere.
It is possible that, for some strange reason, your bit time is being set wrongly.
Getting an output shows it works but getting garbage characters is often a sign of the wrong baud rate.
As an experiment try setting the bit time directly:
#define BIT_TIME 868
Which works here.
By the way, how did you find out that the baud rate to use is 115200? I could not find a reference to that anywhere.
-
- Active Member
- Posts: 35
- Joined: Tue Mar 08, 2011 12:58 pm
Tried changing it.. but stil nothing..
The Baud Rate I found somewhere reading..
XMOS has an UART-example, and i think it whas this one which said 115200bps is standard..
Greets,
Ganux_
The Baud Rate I found somewhere reading..
XMOS has an UART-example, and i think it whas this one which said 115200bps is standard..
Greets,
Ganux_
-
- Respected Member
- Posts: 296
- Joined: Thu Dec 10, 2009 10:33 pm
Sadly I'm out of ideas. Hope someone else passes by here soon to help you out.
-
- Active Member
- Posts: 35
- Joined: Tue Mar 08, 2011 12:58 pm
Anyway, thank you a lot for trying to help me out!!
One of these days I will have another XC-3 dev board + xtag to use, and i'll try to run it on that one..
(hardware error..)
For now i'll pass to the next part of my project:
XC-3 & UDP
Anyway, if i get my UART working i'll drop my solution here!!
Ganux
One of these days I will have another XC-3 dev board + xtag to use, and i'll try to run it on that one..
(hardware error..)
For now i'll pass to the next part of my project:
XC-3 & UDP
Anyway, if i get my UART working i'll drop my solution here!!
Ganux
-
- Respected Member
- Posts: 296
- Joined: Thu Dec 10, 2009 10:33 pm
I have one last suggestion:
Try inverting all the bits before outputting them, start and stop included.
Desperate I know...
Try inverting all the bits before outputting them, start and stop included.
Desperate I know...
-
- Member++
- Posts: 17
- Joined: Fri Aug 12, 2011 2:36 pm
I'm also trying to get the UART example working from the sample PDF written in 2009. I've modified my code to use the initial bits from Ganux's source, i.e. specifying the core used for the ports, and using PORT_UART_TX instead of XS1_PORT_1A. I don't have the hardware here with me, but I wanted to try to use the simulator. Heater, you mentioned using the simulator in an earlier post. Can you confirm whether or not it's worth trying to simulate the UART example, or should I wait until I get home when I can plug in my XC-1A?