Hi,
When I configured the ADC in mpc5746C, after using PE to configure the ADC, I found that the program would always enter IVOR1_Handler when the ADC was initialized. The program has an operating system.
Hi,
From the description you have provided is almost impossible to tell you where is the problem
I guess, you are accessing some reserved/uninitiated space of memory/registers.
If you debug your driver assembly step by step you will see where exactly you code crash and why it jumps to IVOR1.
regards,
Peter
Hi,
I have just tested your code and it is running without any exceptions being pulled.
It converts ADC channels, jumps to ISR, etc..
I see nothing strange.
Are you using our evaluation board, or custom board?
What about clocks? Crystal used, etc...
Check if this is aligned with example settings.
regards,
Peter
Hi,
I added an operating system to the ADC demo, and the ADC crashed. Why is this?
Hi,
Seems to me like SW issue.
What does "crashed"means? you end up in some exception?
You cannot just add something to operating system without any knowledge on the SW and HW.
How do you handle interrupts?
Do your OS has permissions to write to ADC registers? There can be a lot of choke points...
I suggest you to first make OS run and make sure it runs well.
Then starting add some simple tasks which for example enable ADC, do conversion and serve interrupt.
Once this works, you will have a good idea on how to proceed.
regards,
Peter
Hi,
In the case of ensuring the normal operation of the operating system, once the ADC is added. "No source available for" uSDHC_DriverIRQHandler () at 0x1002bc8 "" will be displayed when the ADC is initialized.I do n’t know much about this chip, I really do n’t know how to solve this problem, and I did n’t look for similar problems and solutions, so I hope you can help me solve it. thank you very much!
Hi,
Hmm, ok, it will be hard for you to resolve issues when you have very limited knowledge on uC.
First it seems like you are missing some source files in project. Make sure you have al of them for compilation and there will be no warnings/errors (critical ones).
No source available mean you won't be able to see C code which is in that file. You will see only assembly instructions. This is usually solved by adding a source file to debugger GUI or by recompiling the project.
It is nothing critical, which prevents application from normal run.
regards,
Peter
Hi,
When no operating system is added, the ADC can work normally. After the operating system is added, the ADC initialization crashes directly and the operating system does not work properly. After I shielded the code related to ADC, the operating system can work normally.The last picture is the development board I used.
Hi,
I experimented again, and there was really no problem. My configuration is basically the same as Demo, but that interruption error will occur.
Hi Peter,
I have only recently come into contact with the chip, so there are many things I don't understand. I would like to ask where to check the code in this case. I generated the ADC using PE, then transplanted the formal initialization code, and the program had this problem. I really don't know what to do, I hope you can give me some suggestions. thank you very much.
regards,
I found the problem during debugging, but I don't know why it happened. This is the picture when I debug, I hope someone can help me, thank you very much!