I'm not able to make a simple periodic interrupt work, using a custom board with a MKL05Z32VFM4 CPU . This is the 32 pin package, but in PEX I'm selecting the VLF4 48 pin version, the only option present. Is this allowed?
I start a new project then add an auto initialized and enabled TimerInt. I never get a call to the OnInterrupt function.
The main loop in ProcessorExpert.c is executed correctly.
Doing the same thing on a KL 25 Freedom Board works perfectly.
I attach a test program.
Regards.
Alberto
Original Attachment has been moved to: test05.zip
Solved! Go to Solution.
After comparing the codes, it turns out that the problem is in the setting
Internal periferals -> Flash configuration field -> Peripheral settings -> NMI function.
When this bit is enabled, no interrupts are served.
This is the default settings provided by the project wizard and by the CPU bean. Not so friendly, I would say.
I have Internal peripheral -> NMI pin disabled.
Hi,
Regarding CPU selection - in CW 10.3 if you'd like to select another package, you need to add a new CPU component (as you can see on attached screenshot):
1) In component selector open the tab Processors
2) Select you CPU: Kinetis L / MKL0x / KL05Z / MKL05Z32xxx4
3) In the dialog shown, select the package you need (e.g. 32-Pin QFN)
I have tried your project on TWR-K05Z48 with 48 pin version and it seems to work properly.
best regards
Petr Hradsky
Processor Expert Support Team
Thanks. I would make the package one of the properties of the CPU bean, and of course fix the project wizard which does not let the user choose the package.
Same thing with a PWM component. No events are called. But the correct signal is generated on the output pin, so I guess the clock reaches the periferal.
Any idea?
An update: everything seems to be OK when the CPU component is copied from the ADC_TempSensor KL05 pex example. I will investigate.
ConsoleIO transmits at half the specified baud rate. Maybe because the clock path shows the clock is sourced from the IRC at 4 MHz, but the core clock in the CPU component is set at 2 MHz. I'm using VLPM and BLPI.
Hi,
I recommend to check the clock settings in the CPU. Do you use external crystal/oscillator or just internal one?
Check the CPU peroperties Clock settings / System oscillator 0 and then Clock source settings / Clock source setting 0 / MCG settings/ MCG mode etc..
If the problem persists, please post a sample project with the problem.
best regards
Petr Hradsky
Processor Expert Support Team
After comparing the codes, it turns out that the problem is in the setting
Internal periferals -> Flash configuration field -> Peripheral settings -> NMI function.
When this bit is enabled, no interrupts are served.
This is the default settings provided by the project wizard and by the CPU bean. Not so friendly, I would say.
I have Internal peripheral -> NMI pin disabled.