ADD LDD on FRDM board causes PE ISR

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

ADD LDD on FRDM board causes PE ISR

Jump to solution
1,473 Views
steve_fae
Senior Contributor I

vision4legacy2_1_13PE_ISR.zip is attached in my documents which should be visible.

When trying to utilize the ADC I get the PE ISR shown below.  Previously using the DAC LDD caused this by not

using auto initialization in the component properties, but that didn't solve the ADC problem.  Any help why this is happening?

PE_ISR(Cpu_Interrupt)

{

  /* This code can be changed using the CPU component property "Build Options / Unhandled int code" */

  PE_DEBUGHALT();


Tags (2)
0 Kudos
1 Solution
1,074 Views
steve_fae
Senior Contributor I

figured it out.  I didn't initialize the ADC pointer that was being passed.  I just used their code blended into mine and I initialized a DAC pointer instead to NULL.

View solution in original post

0 Kudos
15 Replies
1,074 Views
JimDon
Senior Contributor III

I don't use PE, but why do you think it is the ADC?

I am thinking it is an "unhandled interrupt" but that does not mean it is a hard fault.

Does the passed in value, Cpu_Interrupt tell which interrupt it is?

0 Kudos
1,074 Views
JimDon
Senior Contributor III

If you click "Use Advanced Editor" you get a button on the bottom to upload a file.

0 Kudos
1,074 Views
steve_fae
Senior Contributor I

I have no clue where I set use advanced editor :smileyhappy:  the code which includes concole, timer, dac,etc

were all working perfectly. when trying to add high level bean I could only get one channel to convert.  then the TIC gave me example using LDD which worked in their example but cause PE ISR in mine.  I had the same issue getting PE ISR with DAC LDD before I set auto initialize in component setting. that didn't help for ADC. 

0 Kudos
1,074 Views
JimDon
Senior Contributor III

What is a TIC?

If you click reply, then look in the upper right corner you will see a link that says "Use advanced editor".

That is one of the draw backs of using PE, it can be hard to integrate "other" code.

I would think the issue is that the sample code has a function ADC0_IRQHandler(), but since the PE interrupt table is different, it does not over ride the weak function defined in kinetis_sysinit.c in a non PE project. Does the sample code have such a function?

0 Kudos
1,074 Views
steve_fae
Senior Contributor I

TIC is the Freescale online support system.  I don't see Use Advanced Editor anywhere

pastedImage_0.png

There is no occurrence of ADC0_IRQHandler in the project.  

0 Kudos
1,074 Views
JimDon
Senior Contributor III

Higher,,,,

editor.png

1,075 Views
steve_fae
Senior Contributor I

figured it out.  I didn't initialize the ADC pointer that was being passed.  I just used their code blended into mine and I initialized a DAC pointer instead to NULL.

0 Kudos
1,074 Views
steve_fae
Senior Contributor I

got it, see above attached project.  I was look at message stream from inbox which doesn't allow advanced editor or attachment. 

0 Kudos
1,074 Views
steve_fae
Senior Contributor I

here is the file attached again

0 Kudos
1,074 Views
steve_fae
Senior Contributor I

ok, different view of the same stream of comments and I can now see advanced editor.  whew....

thanks for your patience, see attached project.

0 Kudos
1,074 Views
JimDon
Senior Contributor III

I am not seeing the attachment.

See if this is done any where in the code before you try to use the ADC:

  SIM_SCGC6 |= SIM_SCGC6_ADC0_MASK;

0 Kudos
1,072 Views
steve_fae
Senior Contributor I

how can I upload the zip problem along side my questions and if you were to add an attachment, where would it show up?  even my local Freescale FAE didn't know.  I can email you the zip directly if you give me an address.

0 Kudos
1,074 Views
JimDon
Senior Contributor III

Is there a file attached to this post?

0 Kudos
1,074 Views
steve_fae
Senior Contributor I

I don't know how to attach a file here.  I uploaded it in my files.  the tool bar just above this image does not show upload file.  only text input, upload image, insert video, insert link, etc. 

0 Kudos
1,074 Views
steve_fae
Senior Contributor I

yes it is set

pastedImage_0.png

0 Kudos