SYSMPU Enable

cancel
Showing results for 
Search instead for 
Did you mean: 

SYSMPU Enable

155 Views
Senior Contributor I

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 Kudos
6 Replies

32 Views
Senior Contributor I

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 Kudos

32 Views
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 Kudos

32 Views
Senior Contributor I

Please

It is a simple request...

Pietro

0 Kudos

32 Views
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 Kudos

32 Views
Senior Contributor I

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 Kudos

32 Views
Senior Contributor I

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 Kudos