This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

GPIO not toggling when processor is running but works with Debugger when stepping through

Other Parts Discussed in Thread: OMAP3530

I have run into a strange problem.

I am using the OMAP3530 board from Logic. I toggle a GPIO  every 800 us in a FIQ handler i.e. high for 800us and low for 800us.. When I step through the FIQ handler code I can clearly see the GPIO toggle on a scope. When I execute the code, I do not see the toggling of the GPIO line. I know this is not a scope issue as I also set up my FPGA to toggle a FPGA gpio line at 800us and I was able to see it on the scope. Is there some issue with the L4 interconnect that needs to be taken care of for this to work. I am toggling at such a slow speed that I did not think that this would be a problem.

  • Hmmm, doesn't ring any bells.  As an experiment can you make the toggling period larger and larger until you see something?  I'm curious to know what you see.  Perhaps there will be a clue in there.  Which pin are you toggling?  Are you doing a read-modify-write of the GPIO_DATAOUT register or are you utilizig the GPIO_CLEARDATAOUT and GPIO_SETDATAOUT registers to simplify down to a single write?  (Hint: reads to configuration registers are slow, so using the set/clear registers to do a write will be much better.)

  • Hi Angelo and Brad,

    I as well agree that this is kind of strange. How is the OS environment in where you are currently trying this? in case of a non-OS environment my best guess would be related to wrong cache configuration for the GPIO memory register block causing the read/writes to succeed properly when run through the emulator/JTAG, since this will typically flush caches all the time, but  failing to hit the registers when running in a free system since the caches wont be flushed? => No writes actually hit the registers => No GPIO flipping.

    Best regards - Please update us with the actual root cause when you have found it - Thanks in advance
      Søren

  • yes this is a non-OS environment.

    I am pretty sure it is not the caching - I even disabled caches completely I still did not see it. What I did notice was that even lowered the rate at which I attempt to toggle the GPIO, I started seeing the toggling on the scope. I know it is not the scope setting since I was able to see other faster signals with it at the same time. I am starting to think this is a board related issue. Will keep you posted. Meanwhile if you think of anything do let me know.

    Thanks

    Angelo

  • Hmm - This is getting strange - I have no obvious ideas.  How fast can you go before beginning to loose edges on the scope? It might be an idea to try to set the ARM to use non-posted-writes for debugging purposes as described here in the TRM chapter: "7.5.1.16 Force MPU Writes to Be Nonposted". Straight out of the blue I wouldn't expect this to cause any kind of difference, but it might give us another data point for debugging

    Last but not least I thought that I would say that I see no obvious reason why it should be L3/L4-related, but again a good point to keep in mind you mentioned in the beginning of the thread...

    I will let you know in case anything else pops in my mind
      Søren