SYSMPU Enable

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

SYSMPU Enable

2,901 次查看
pietrodicastri
Senior Contributor II

Good morning

I am trying to run the USB cdc cdc example in a K20 evakit.

Since no SDK is provided for MCUXpresso for this board I try to build the project by hand

copying another for a differenct eva board.

I have a hard fault when the function USB_DeviceApplicationInit() and then the SYSMPU_Enable(SYSMPU, 0);

is called.

I tried to delete the call to SYSMPU_Enable but the device has a malfunction.

Any suggestion on what happens??

Thank You

Pietro

0 项奖励
回复
6 回复数

2,778 次查看
pietrodicastri
Senior Contributor II

Hi Alexis

Thank You for the suggestion.

These bundle examples are not equipped for the MCUXpresso.

It does not look so simple to just export.
If It is possible just express on the observation regarding the

MK20D10_features.h file.

This file reports 

#define FSL_FEATURE_SOC_SYSMPU_COUNT (1)

but it seems this processor has not, since when I try to execute

SYSMPU_Enable( .... ) 

there is a hard fault.

If you confirm I feel at least comfortable.

Thank You

Pietro

0 项奖励
回复

2,778 次查看
Alexis_A
NXP TechSupport
NXP TechSupport

Hello Pietro,

In the SYSMPU_Enable, the CESR register is modified. This register doesn't exist in the 72 MHz so you can use this function. The SDK available for MCUXpresso is for the 100 MHz so is no compatible with the 72MHz.

In this case, you will need to use the code bundle I mention or if you can, change to the 100 MHz version.

Best Regards,

Alexis Andalon

0 项奖励
回复

2,778 次查看
pietrodicastri
Senior Contributor II

Please

It is a simple request...

Pietro

0 项奖励
回复

2,778 次查看
Alexis_A
NXP TechSupport
NXP TechSupport

Hello pietrodicastri‌,

For this specific MCU, as you mention there isn't an SDK but is a bundle of examples available, you can find them in the following link.

There is an example using the USB as CDC device.

Best Regards,

Alexis Andalon

0 项奖励
回复

2,778 次查看
pietrodicastri
Senior Contributor II

Hei

I still need a help.

The feature file I include is MK20D10_features.h. Is it the correct one TWR K20D72M board??

In this file I read 

#define FSL_FEATURE_SOC_SYSMPU_COUNT (1)

Is it correct?

In the function USB_DeviceApplicationInit( void )

Is the conditional call to SYSMPU_Enable( .... ) as here

#if (defined(FSL_FEATURE_SOC_SYSMPU_COUNT) && (FSL_FEATURE_SOC_SYSMPU_COUNT > 0U))
   SYSMPU_Enable(SYSMPU, 0);
#endif /* FSL_FEATURE_SOC_SYSMPU_COUNT */

When the SYSMPU_Enable( ... ) is called the hard fault is triggered.

I am beginning to thine the FSL_FEATURE_SOC_SYSMPU_COUNT  should be 0.

for this processor.

Anyway I commented the SYSMPU_Enable( ... ) call.
The composite cdc cdc device gives error with windows 10. From the device manager I get 

Device Descriptor Request Failed.

I tried to install the driver with the one in the SDK but it says the best driver is already installed.

Please a help

Pietro

0 项奖励
回复

2,778 次查看
pietrodicastri
Senior Contributor II

Hei 

If someone is willing to help me I can drop here the project. 

I am working on the TWR K20D72M board

Thank You

Pietro

0 项奖励
回复