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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
1,861 次查看
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 项奖励
回复
1 解答
1,844 次查看
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

在原帖中查看解决方案

4 回复数
1,855 次查看
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 项奖励
回复
1,852 次查看
terence_kong
Contributor II

I am on IAR

0 项奖励
回复
1,845 次查看
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

1,841 次查看
terence_kong
Contributor II

thanks Mark, it's the MPU

0 项奖励
回复