Author Topic: 52259 EVB UART interrupt  (Read 9500 times)

Offline emussini

  • Newbie
  • *
  • Posts: 11
    • View Profile
52259 EVB UART interrupt
« on: February 23, 2011, 10:20:23 PM »
Hi, I'm using the uTasker 1.4 project for a 52259 EVB board. After some time with the simulator, and successfully trying most of the proyect features, I decided to start with the actual target board. The question is about UART interrupts not being generated and how to debug this problem.

Using CW, I tried setting a breakpoint in  _SCI1_Interrupt but nothing happens when the character is received, however the breakpoint is hit every 10 seconds when the Async routine I wrote is scheduled, and  I just get two bytes from the UART using fn. The rest of the information is lost.

Transmission works fine, every time I send out a byte the breakpoint is hit and I see the data at the hyperterm at 9600baud. I also tried UART0 and UART2 with similar results.


I'm sure I'm missing something, but I can't figure it out, any help is greatly appreciated.

Elio Mussini

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3147
    • View Profile
    • uTasker
Re: 52259 EVB UART interrupt
« Reply #1 on: February 23, 2011, 11:00:46 PM »
Hi

Check whether you have SERIAL_SUPPORT_DMA defined in the project (in app_hw_m5223x.h).

If this is the case you will need to ensure that the DMA configuration parameter is set to a known value otherwise it may be randomly setting some DMA operation.

tInterfaceParameters.ucDMAConfig = 0; // this disables DMA - if it is not defined it will be random and so could cause strange effects


Regards

Mark

Offline emussini

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: 52259 EVB UART interrupt
« Reply #2 on: February 24, 2011, 03:31:57 AM »
Thanks very much for your quick reply. Indeed, it was defined. I added ucDMAConfig  inicialization as you suggested, but unfortunately I see no changes, ISR still not firing upon receiving data.

Thanks again

Elio

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3147
    • View Profile
    • uTasker
Re: 52259 EVB UART interrupt
« Reply #3 on: February 24, 2011, 05:07:35 AM »
Elio

Check the UART Rx pin being used. Maybe your board has it connected differently (?). The UARTs can often be mapped to more that one port.
Have you measured that the rx signal is arriving at the pin?

At the moment I can't think of any other reason why you should get Tx interrupts but not Rx since this is not a typical problem. I see that you are also using the debug interface (fnDebugMsg()) - does this UART channel operate correctly in both directions? Also make sure that the debug and your Port1_Id channel are not on the same UART.

Regards

Mark

Offline emussini

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: 52259 EVB UART interrupt
« Reply #4 on: February 24, 2011, 06:16:27 AM »
Thanks for your replay Mark, I wired the tx/rx in the primary function pins, same as the EVB. Debug operates In one direction, I didnt know it can also receive, how does that work?
The UARTS are used are not the assigned to Debugging. As a side note, I do get 3 or 4 bytes, so is not a wiring problem.

Thanks again

Elio


Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3147
    • View Profile
    • uTasker
Re: 52259 EVB UART interrupt
« Reply #5 on: February 24, 2011, 07:27:00 PM »
Elio

In the demo project the debug UART receives in application.c. It echos the received characters and interprets the content (when there is line feed pressed) in debug.c.
That means that you should get the debug menu when you press the enter key (assuming USE_MAINTENANCE is still defined).

See the following (at time 2:00) to see the standard menu on the UART (it is also available via TELNET or USB CDC) - http://www.youtube.com/watch?v=2Rbz1SOoJVI

Regards

Mark

Offline emussini

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: 52259 EVB UART interrupt
« Reply #6 on: February 24, 2011, 10:31:59 PM »
I tested the original uTasker 1.4 package and UART0 works fine showing the maintenance screen, however recompiling the package without any changes except using CW7.2 is somehow producing this behavior of lack of reception in the UART0.

I suppose CW7.2 can't be used, or maybe it can with some sort of tweaking, would you please suggest the way to go?

Thanks

Elio

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3147
    • View Profile
    • uTasker
Re: 52259 EVB UART interrupt
« Reply #7 on: February 26, 2011, 10:40:30 PM »
Hi Elio

I don't think that I have heard of problems with CW 7.2 (not in respect to the UART).

At the moment I can't explain why there is not an interrupt on each character - I don't know how this is possible since there will normally be an interrupt after each start bit followed by the defined number of bits - irrespective of whether they are even correct bits.

Regards

Mark

Offline emussini

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: 52259 EVB UART interrupt
« Reply #8 on: February 26, 2011, 10:51:00 PM »
Hi Mark, thanks again for taking the time to answer. I just moved all the code to CW7.1.2 and everything works great.
Regards

Elio