MPC5125 and MQX

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MPC5125 and MQX

747 Views
Vishwa
Contributor II

We want to use MPC5125 in a new design for a Smart Information Display.

 

But, I have lot of confusions:

  1. There are only two registers for interrupt in MPC5125 DIU, INT_STATUS and INT_MASK. INT_STATUS is Read only. I plan to use LS_BF_VS interrupt.

So, How do I clear the event once LS_BF_VS is received, I understand I have to clear the event in ISR?.

2. I am going through the Chapter 18 IPIC in MPC5125RM, I understand that I have to program the IPIC registers also for handling the DIU interrupt.

So, I would like to know what all I have to do in IPIC to handle and service DIU interrupt?

3. I plan to use Freescale Codewarrior and Freescale MQX to develop the software, I was going through the MQX code and the Freescale GUI code, it does not use interrupt. So, I have to add code for the following:

a. Initialize DIU registers and enable LS_BF_VS interrupt.

b.    Modify the IPIC to handle DIU interrupt, I saw there is a file int_cntl_mpc5125.c in BSP which I have to modify, if you can tell me what all I have to do in IPIC, I will modify the code in int_cntl_mpc5125.c to handle the DIU interrupt.

c. I have to install DIU_Isr and write Isr to service DIU interrupt, if you can tell me what all I have to do to install DIU_Isr, I will write the code.

Can someone tell how to enable/handle DIU interrupt, program IPIC in MPC5125, install Isr and write Isr.

Best Regards.

M.S.Visweswaraiah.

0 Kudos
5 Replies

530 Views
TomE
Specialist II

12.4.11 Interrupt Generation

The DIU generates interrupt through a single line controlled by the contents of two registers:
INT_STATUS (12.3.3.18/12-24) and INT_MASK(12.3.3.19/12-25). When an interrupt occurs, the host
needs to read the INT_STATUS register to find the source of the interrupt. The read operation also clears the register.

 

Tom

 

0 Kudos

530 Views
Vishwa
Contributor II

Hello Mr.Tom,

In MQX BSP in file int_ctrl_mpc5125, I have to add code for DIU interrupt. There is no documentation for the code in the file int_ctrl_mpc5125 file, I do not know how modify this file to handle DIU interrupt? can you please help me?

Regards.

M.S.Visweswaraiah.

0 Kudos

530 Views
TomE
Specialist II

No, I can't help you. I don't use this chip, don't have the development board, the BSP or any experience with it. I was able to answer your first question in way less than a minute by searching through the display controller chapter in the Reference Manual. All the information I'd need to do this work is in that manual.

 

The skill set you need for this is not just the understanding of the display controller. You need to know everything else about this CPU, the way interrupts work, the interrupt tables, interrupt controller programming and so forth. Then you need to know how your development environment supports defining interrupts. Some do most of the work for you (declare a function an "interrupt" and it puts the information in the table for you) but other don't. Then how your "operating system" handles interrupts (what you can and can't do in an interrupt service routine, how to signal user code and so on).

 

if you have working example code that handles interrupts for other peripherals, then that should form a working sleleton for adding an interrupt for the display controller. Everything the other code does for those parts your code has to do for this one.

 

 

If you need working code quickly, then consider buying it from one of the software houses. Some of them might provide working graphics drivers supporting this part.

 

If you want more example code, just use Google to search for keywords. "MPC5125 DIU, INT_STATUS and INT_MASK. INT_STATUS" found me this link to this patch to a Linux distribution that has code to handle this part.

 

http://repository.timesys.com/buildsources/k/kernel/kernel-2.6.29/linux-2.6.29-fs-mpc5125-20100827.p...

 

No, I can't help with navigation on that site or interpretation of that code either. Linux code is famously complicated. I don't even know if that code is using interrupts on this part.

 

Searching for the exact DIU register names as defined in the header files might find you something better.

 

Tom

 

 

 

 

0 Kudos

530 Views
Vishwa
Contributor II

Thanks for your suggestions, I am going through some example code in Freescale MQX.

 

Vishwa

0 Kudos

530 Views
Vishwa
Contributor II

Now DIU interrupt is working, I used MQX int_install_isr function.

 

Vishwa.

0 Kudos