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.
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!
From the description you have provided is almost impossible to tell you where is the problemI 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.
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.
The compressed package is the code I modified from the official website routine. There is a problem here, I think the problem is the same. Can you show it to me?
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.
I experimented again, and there was really no problem. My configuration is basically the same as Demo, but that interruption error will occur.
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.
I added an operating system to the ADC demo, and the ADC crashed. Why is this?
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.
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!
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.
Retrieving data ...