twrK20d72m project I want to change the microcontroller to be K20DN512xxx10 instead of K20DX256xxx7.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

twrK20d72m project I want to change the microcontroller to be K20DN512xxx10 instead of K20DX256xxx7.

Jump to solution
852 Views
terence_kong
Contributor II

I'm using K20 twrK20d72m for my development however we change to use different K20 MCU for bigger flash memory , from K20DX256xxx7 to K20DN512xxx10.

Everything works fine except the USB interface, the HID task do not get any USB event form the usb driver.

What action do I need to take in order to use the same twr20d72m project and have the USB driver(usbd_twrk20d72m/usbh_twrk20d72m) work on K20DN512xxx10 ?

 

0 Kudos
Reply
1 Solution
835 Views
mjbcswitzerland
Specialist V

Hi

The 100MHz K20 has a memory protection unit (MPU), which the 72MHz K20 doesn't have and USB access is not allowed by default and so it needs to be configured or disabled.

Disable the MPU with

MPU_CESR = 0; // allow concurrent access to MPU controller

to be compatible with the 72MHz K20.

Regards

Mark
[uTasker project developer for Kinetis and i.MX RT]
Contact me by personal message or on the uTasker web site to discuss professional training, solutions to problems or rapid product development requirements

For professionals searching for faster, problem-free Kinetis and i.MX RT 10xx developments the uTasker project holds the key: https://www.utasker.com/iMX/RT1064.html

View solution in original post

4 Replies
846 Views
myke_predko
Senior Contributor III

@terence_kong 

You most likely have a clocking problem - If you're using MCUXpresso, check to see the operation of the "USB FS clock" using the Clock Wizard.

myke

 

0 Kudos
Reply
843 Views
terence_kong
Contributor II

I am on IAR

0 Kudos
Reply
836 Views
mjbcswitzerland
Specialist V

Hi

The 100MHz K20 has a memory protection unit (MPU), which the 72MHz K20 doesn't have and USB access is not allowed by default and so it needs to be configured or disabled.

Disable the MPU with

MPU_CESR = 0; // allow concurrent access to MPU controller

to be compatible with the 72MHz K20.

Regards

Mark
[uTasker project developer for Kinetis and i.MX RT]
Contact me by personal message or on the uTasker web site to discuss professional training, solutions to problems or rapid product development requirements

For professionals searching for faster, problem-free Kinetis and i.MX RT 10xx developments the uTasker project holds the key: https://www.utasker.com/iMX/RT1064.html

832 Views
terence_kong
Contributor II

thanks Mark, it's the MPU

0 Kudos
Reply