AnsweredAssumed Answered

K20 BSP Library Issue

Question asked by Alessandro Vagniluca on Sep 18, 2012
Latest reply on May 7, 2013 by Thomas Dowad

I started developing my first Touch Sensing application on my Kinetis K20-based (K20DN128VLH5) custom board with CW 10.2, MQX 3.8.1 and TSS 3.0.

I updated CW 10.2 with all the current updates and service packs; Processor Expert version is 5.3.

Because I want to use MQX RTOS, I first started to make the PSP and BSP libraries needed by my application, cloning the bsp_twrk20d50m psp_twrk20d50m libraries that come with MQX 3.8.1. I want to use Processor Expert LDDs to have the low-level drivers for my board.

 

On my board I use the same 8MHz crystal oscillator used on the TWR-K20D50M, but the RTC oscillator is not used (a 32,768kHz crystal is not mounted).

I set the CPU component for that configuration (48MHz clock for the cpu core, see the my attached ProcessorExpert.pe project file).

Then I got PSP and BSP libraries compiled and I wrote a simple "Hallo World" application to test them.

 

Starting the debugger, I get immediately a crash before the jump to my Main_task() function. I can see the cpu hangs executing the __pe_initialize_hardware() function in the generated Cpu.c file.

Executing step-by-step the code, I see the crash occurs when BSP initializes the hardware, after the enabling of the external oscillator and during the switching to FBE mode; the switch to PBE mode is never reached.

 

I haven't got a TWR-K20D50M for a reference. I can only see the 8MHz crystal oscillator is properly running on my board.

Could you please help me to solve this K20 BSP issue?

 

Another question:

The K20 cpu provides a USB controller. Driving the internal PLL to 96MHz it should be possible to have the 48MHz clock needed by the USB controller. Why in the K20 CPU component the USB clock settings are not present under the PLL/FLL clock selection property in the defined Clock configurations?

Because my application will use USB communication port, how can I be sure the 48MHz clock is properly provided by the clock configuration used?

 

Best Regards.

 

 

 

Original Attachment has been moved to: ProcessorExpert.pe.zip

Outcomes