Help! KEAZ-128 Interrupts don't work

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

Help! KEAZ-128 Interrupts don't work

3,090 Views
poweric
Contributor I

I must be doing something Boneheaded.

I have been systematically going through each of the example programs in the KEAZ-128 SDK drivers directory from the QSP. None of the interrupt-driven examples fire interrupts. The polling examples seem to work fine.

Does anyone have a clue as to what's up?

Thank you.

Tags (3)
0 Kudos
15 Replies

2,860 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Bill Smith,

 

I have tried the newest QSP, the following interrupt works:

\FRDM-KEA-QSP\Code Project Examples and Sample Drivers (Evaluation Grade Only)\FRDM-KEAZ128\Driver Test SW for KEAZ128\FRDM_KEA128_PIT

I attach the project directly, you also can test it on your side.

pastedImage_1.png

You can unzip it and import it your S32DS 2018

Wish it helps you!

Best Regards.

Kerry

 

0 Kudos

2,859 Views
poweric
Contributor I

Hi Kerry,

Thank you again for your help in trying to figure out what is going on with this issue.

I downloaded your example, “FRDM_KEA128_PIT”, and tried to run it on both S32DS for ARM 2.2 and on S32DS 2018 R1 IDEs.

When trying to open the project in S32DS for ARM 2.2, and after cleaning, Compile gives me all these errors. I have no idea how to fix this.

On the S32DS 2018 IDE I was able to import the project and compile it, however the program hangs at this line in the code:

I have attached the ONLY interrupt example project that I have been able to find that works on both IDEs. It is essentially the same idea, using the PIT to generate an interrupt every 1 sec, and toggle the Blue LED every time the ISR is run.

Maybe you can figure out what the difference is.

Best Regards,

Bill

0 Kudos

2,858 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Bill Smith

  Which debugger you are using?

  I am using the JLINK firmware, please try the JLINK firmware on your side.

  You can download the JLINK firmware from this link:

https://www.segger.com/downloads/jlink/OpenSDA_V1 

  You can enter the bootloader mode, and change the debugger firmware, and try my project again.

   Any updated information, please kindly let me know.

Best Regards,

Kerry

0 Kudos

2,858 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Bill Smith,

  I still can't see your detail information in the post, seem already have updated information.

  Do you use the following board?

NXP Freedom Development Platform for Ultra Reliable Kinetis EA Series MCUs | NXP 

  Please tell me your board version, I will compare with my board, that's strange, it totally works on my side.

Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

2,859 Views
poweric
Contributor I

It is the FRDM-KEAZ128-Q80. It looks like the picture on the NXP website, except that it is red in color.

Best Regards,

Bill

0 Kudos

2,859 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Bill Smith

  Please check the board back side, you will find a label about the SHC-XXXX REVX, I am REVB, what about you?

  I will download the newest QSP and test it, I test the old one in the previous time.

Best Regards,

Kerry

0 Kudos

2,859 Views
poweric
Contributor I

Hi Kerry,

I have two boards, both are REVB.

Best Regards,

Bill

0 Kudos

2,859 Views
poweric
Contributor I

Hi Kerry,

I have the FRDM-KEAZ128Q80. It is like the picture on the NXP website, except that the color is red.

Best Regards,

Bill

0 Kudos

2,860 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Bill Smith

  I think your issue is caused by the new S32DS v2.2 IDE.

  Please download the old S32DS v2018

https://www.nxp.com/webapp/swlicensing/sso/downloadSoftware.sp?catid=S32-DS-ARM_v2018 

  Then you can open the QSP package, all the interrupt work.

  I have tested it on my side with S32DS v2018.

pastedImage_2.png

You can find the PIT project interrupt can be entered.

I use the S32DSv2.2 also meet your build issues, so I think it is the IDE issue.

The QSP is established based on the V2018.

Please try it on your side.

If you still have questions about it, please kindly let me know.

Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

2,860 Views
poweric
Contributor I

Hi Kerry,

I have tried everything that you have suggested, including installing the older V2018 IDE. None of the SDK interrupt examples worked!

The ONLY way that I have been successful at getting interrupts on the FRDM-KEAZ128-Q80 evaluation board (two different boards), was to follow the following work-flow. Unfortunately, nothing else worked for me.

File --> New --> S32DS Project from Example: 

pastedImage_2.png

Wait.... Wait some more... Until the sample files dialog opens up.

Select the KEA128 example "hello_interrupts_kea128", and give it a new name.

pastedImage_3.png

Press the [Finish] button.

Now compile it, and the Blue LED blinks at a one-second PIT interval, as advertised. Happy joy. I can adapt the PIT example to handle external interrupts, the ADC, but then all the interrupt sources have to use it. I can't believe that this is how interrupts are supposed to work on this MCU. 

If I simply create a new S32DS project and import all the relevant *.c and *.h files, the program will compile OK, but the PIT interrupt never happens! In fact, none of the interrupt examples from the FRDM-KEA-QSP KEA128 drivers work, not even using the method I explained above. Only this example, imported the way that I described. 

This is frustrating. Is it a problem with the Eclipse IDE, or the example programs? I must have a project option or compiler switch set wrong.  

I am not feeling Force Obi wan...

0 Kudos

2,860 Views
kerryzhou
NXP TechSupport
NXP TechSupport

It seems you already have the updated information, but I can't see your new updated information.

0 Kudos

2,860 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Bill Smith,

  The enable global interrupt is:

#define enable_irq NVIC_EnableIRQ
#define disable_irq NVIC_DisableIRQ
#define EnableInterrupts __enable_irq()
#define DisableInterrupts __disable_irq()

Do you mean this PIT interrupt project : FRDM-KEA128\FRDM-KEA-QSP\Quick Start Package v5\SDK Drivers and Code Example Projects\FRDM-KEAZ128\Driver Test SW for KEAZ128\Driver Test SW for KEAZ128\FRDM_KEA128_PIT

Also can't work?

What't the board you are using now? FRDM-KEA128? Please help to confirm it, then I will help you to check it.

Please also tell me your S32DS  IDE version.

Wish it helps you!

If you still have questions about it, please kindly let me know.

Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

2,860 Views
poweric
Contributor I

Hi Kerry,

The version of S32DS I am using:

The code source that I am using:

From inside S32DS, I open the project in this directory:

When I compile the project, I get all these errors. I don’t know how to fix them:

The target board that I am using:

So Kerry I did get the following to work, produce interrupts, but I don’t understand the difference of this type of project. Why does it work, and a project where I just add source files to a project.

Anyway, when I use FILE--> NEW --> S32DS PROJECT FROM EXAMPLE, wait for the dialog to fill with options, and choose “hello_interrupts_kea128”, I get a project that I can compile and when it runs, the interrupts are working!!

Why can’t I just start a new project and copy the same source files to the project, and get it to run with interrupts??

Best Regards,

Bill

0 Kudos

2,860 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Bill Smith ,

  Do you mean QSP is the official S32DS project, right?

  When you can't fire the interrupt, do you enable the global interrupt? and enable the module interrupt, and write the related ISR service code?

   Share you one simple IRQ interrupt KEA128 project, which is the IAR project, it has been tested on my side, and the interrupt works, you can check it on your side.

1.jpg

Wish it helps you!

If you still have questions about it, please kindly let me know.

Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

2,860 Views
poweric
Contributor I

Hi Kerry,

Thank you for replying to my question, and your help with trying to understand the issue.

Let me answer your questions...

Yes, the latest FRDM-KEA-QSP download from the NXP webpage. Specifically, the subdirectory with all the Driver Test SW for the KEAZ128.

I have tried several of the programs, GPIO, PIT, ADC, UART, I2C, and none of the drivers that are interrupt-driven work. All of the polling drivers work fine.

When I say the interrupts don't "fire", I mean that the ISR is never called, although I am fairly certain that the Module interrupts are enabled since I imported the programs directly into S32DS. You mentioned a Global Interrupt Enable. Where is the bit for this? I read through most of the KEAZ128 RM today, and I could only find one cryptic sentence that even mentions it. Is it in the IRQ_SC register?

I tried to import your included program sample, but I am sorry, I don't know how to import IAR projects. IAR appears to be a much better IDE for ARM code development than S32DS, and I am sure that there are plenty of included libraries and code examples so that you can easily figure out problems.

So, as a final attempt at cracking this nut, I loaded the "hello_interrupts" example from AN5213. This program sets up the PIT to fire an interrupt every 1s, and in the ISR the Blue LED is toggled. I single-stepped the program up to the point where the init_IRQs() is called. At that point, the stops executing. 

int main(void) {
int idle_counter = 0;
GPIOB_PDDR |= 1<<PTE7; /* Port Data Dir: output on port E7, blue LED */
init_clks_FEE_40MHz(); /* Initialize FLL: 8MHz xtal, 40 MHz core, 20 MHz bus clks */
init_IRQs(); /* Initialize interrupts: enable, priorities */
init_PIT(); /* Initialize PIT0: 1 sec timeout, IRQ enabled */
for(;;) {
idle_counter++;
}
}  

Any ideas?

Best Regards,

Bill 

0 Kudos