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.

PSP 1.30 UART driver internal exception.

Other Parts Discussed in Thread: OMAP-L138

Hello,

I'm working on some UART application.

I'm using OMAP-L138 with C6748, with no ARM on SOM.

The IDE is CCS5, BIOS version is bios_5_41_11_38.

I have created a new user defined I/O device, called it UART2 in the DSP/BIOS tcf configuration file.

I have configured the BIOS settings for that device, i.e. initialization call, device ID, etc. I have made all the appropriate configurations for the PSP1.30 UART driver in my application code as well.

I have created two tasks for receiving and sending operations with stack size of 2K for each task.

I call the :

status = GIO_read(UartRecHandle, &Buffer, &Size); 

Then  send a txt file via Hyper Terminal (or another app).

The status returned is '0', which means the receive operation worked OK, the driver received the Buffer of Size.

Right after this, the core is stuck in UTL_Halt() and dropping the following messages at log view:

"EXC_exceptionHandler: EFR=0x2

  NRP=0xff83ff90

  mode=supervisor

Internal exception: IERR=0x8

  Opcode exception

SYS abort called with message 'Run-time exception detected, aborting ...' "

What is the problem, and how can I fix it?

Anatoly.

  • Hi Anatoly,

    It looks like the application did not get exception inside the driver, am i right?

    After coming out of the GIO_read(), have you checked the read buffer for data integrity?

    After GIO_read(), are you calling any of the driver APIs i.e GIO calls?

    Which version of the BIOS PSP are you using?

    Are you using the UART sample application which comes with the PSP with modification like UART instance num etc OR any other application?

    In which I/O mode the UART driver is being used? Can you try with the polled mode for simplicity

    Thanks and Regards,

    Sandeep K

  • After coming out of the GIO_read I check its error code and return it to the caller function, which itself is the receiving task routine. So the flow must return to the caller function and continue the application flow. But this doesn't happen, the application is stuck, and when I click "Suspend" I see these above messages in the log view.

    The application flow is two tasks: sending and receiving respectively. Each of them has the same priority and stack size. The receiving task starts first and it is blocked inside on the interrupt to come, which corresponds to the data arrived to the device (all these is implemented by GIO, mini-driver and the PSP low level UART driver). Since the receiving task is blocked on its internal interrupt/semaphore, the sending task is transmitting the data, which I can monitor on some serial port Windows app. As soon as I send the data (actually some txt file with fixed size), the transmitting task is blocked, and the context switches back to the receiving task, which was blocked on the data received interrupt. 

    As I said before, the error code received from the GIO_read is '0', which means the operation completed, but while debugging the application, I step out of the receiving function (that one the receiving task calls),  the flow doesn't go back to the caller function (the task function), but drops these error messages I mentioned above.

    The PSP is of version pspdrivers_01_30_01.

    I use interrupt mode for the UART driver.

  • The problem is solved. It was a memory allocation issue.

    Thank you, Anatoly.