I have a strange problem with a K22DX mcu. I'm using KDS 2.0 for development with a Segger j-link programmer connected through SWD.
My program works fine when I start it from KDS, but it won't start automatically when I powercycle the board. I have disabled EZPORT in FOPT so I don't think that is the problem. I'm a beginner when it comes to embedded development so I'm very grateful for any help.
已解决! 转到解答。
Ma Hui,
I found the issue. It was the EZ_Port. We accidentally removed the pull-up on the pin on the last HW iteration.
Regards,
Thomas
Hi,
I do a test with TWR-K22F120M board using KDS 2.0 with attached project, which just toggle a led on tower board (the EZPORT function is disabled in FOPT).
I don't meet your mentioned issue with/without debug. The led toggle normally when board power up.
I would recommend customer to check if Flash be programmed or not at first.
Then customer need to check the K22 power circuit, if the VDD rising edge is very sharp.
Customer could refer TWR-K22F120M board schematics K22 VDD related circuit.
Wish it helps.
BTW: If customer want to use attached project, customer need to comment below code at <cpu.c> file line 252 before debug/program K22.
/* MPU_CESR: SPERR=0,VLD=0 */
// MPU_CESR &= (uint32_t)~(uint32_t)((MPU_CESR_SPERR(0x1F) | MPU_CESR_VLD_MASK));
Have a great day,
best regards,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Dear Ma Hui,
You mention if the VDD rising edge is very sharp. It seems that we have issues with that on our own board. Is there a known issue on the K22 if the VDD power rises too quickly?
Regards,
Thomas
Hi Thomas,
It need to check with K22 related errata file. What about the mask set of your K22 chip?
You could find Mask Set at chip surface printed info second row.
Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Our mask is 0N50M, and the errata doesn't say anything about rise time issues. If necessary, I can send a screenshot of the voltage rise tomorrow. It is a very strange problem that I can't find a cause for. I know that the chip doesn't boot because all my code does is disable the watchdog at the Reset Handler, initialize a GPIO, and toggle it. On successful boot, the LED toggles. On failed boot, the LED stays off. There is nothing else between Reset entry and the toggling, except disabling the watchdog.
Hi Thomas,
When you disable the problem chip watchdog, if this chip works as expected?
The watchdog is enable and will reset the chip every 250ms.
If using LED toggle to measure the chip behavior will missing something.
Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------