[Lab 3] My code does nothing

[Lab 3] My code does nothing

by Jon Märki -
Number of replies: 7

Hello,

I downloaded some simple LED activation and printf code on the board but nothing happens. I checked the linke details in the bsp and they seem fine, I have two JTAG UART connections and I chose the correct one (the one that is connecting to the onchip_memory2_0). But when I start the code on the board, nothing happens. No LEDs turn on and no message is printed.

Here are some images that might be useful for helping me. I set my on chip memories to be 100k each.




Here is my qsys file 


Thank you for your help!

Jon

In reply to Jon Märki

Re: [Lab 3] My code does nothing

by René Beuchat -

Hello,

and your system is compiled ? It seems that you use too much on chip RAM.

Best.

RB


In reply to René Beuchat

Re: [Lab 3] My code does nothing

by Jon Märki -

Yes I am able to compile the system without errors, I downloaded it on the board and I could start the program. It just does nothing...

Jon

In reply to Jon Märki

Re: [Lab 3] My code does nothing

by Sahand Kashani-Akhavan -

No idea to be honest. It just seems weird that CPU0 can reset all peripherals of CPU1 (including CPU1 itself). The same observation goes the other way as CPU1 can reset CPU0 and all its peripherals. Perhaps consider removing such connections.

Other than that, try to reduce the on-chip memory, regardless of whether it compiles. I'm surprised 100k per on-chip memory actually compiles. What is the initial value of the LED before you perform the write of 0b1000000001?

In reply to Sahand Kashani-Akhavan

Re: [Lab 3] My code does nothing

by Jon Märki -

Hello,

So I fixed the resets and I changed the memory allocated, the thing is it's generating bss rwdata errors. I removed the printf instruction so I only have the while loop. The thing is that I used the uc/os II hello world file so I suspect it to write a ton of things on my onChip memory. I will try to fix it by using a simple hello world project so that my BSP isn't overloaded.

In reply to Jon Märki

Re: [Lab 3] My code does nothing

by Jon Märki -

Okay so the problem was that the timer was interrupting before the main started and I don't know why. I removed the timer and the code works now.

If you have an idea why the timer interrupts permanently it would be great!

Jon

In reply to Jon Märki

Re: [Lab 3] My code does nothing

by Alon Tchelet -

How long is your timer period? If you put it on too small of a period you will get stuck in an infinite reentrance of the ISR (by the time default timer ISR is completed another period has been completed). Generally you would want it to be in the 100 us scale and above.

In reply to Alon Tchelet

Re: [Lab 3] My code does nothing

by Jon Märki -

Yes that was the problem, the period was set on 1us because I thought it was the tick time for sampling when we used the profiler.

Thanks