Is it possible to enable the MPU while using the ENET MAC device on the K64F MCU?

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

Is it possible to enable the MPU while using the ENET MAC device on the K64F MCU?

Jump to solution
1,129 Views
germanrivera
Contributor III

From sample code and other posts it looks like you have to disable the MPU in order to use the ENET MAC device on the K64F MCU.

Why is that?

I think it should be possible to configure an MPU region for DMA from the NET MAC device., but I have not been able

to find any documentation or example for how to do it. Does anybody know how to do this?

Labels (1)
1 Solution
662 Views
mjbcswitzerland
Specialist V

German

Search for "Bus Master Assignment" Chapter 3.3.7.2 and table 3.20

The slave port assignments are in 3.3.7.1, table 19 on the same page.

Regards

Mark

View solution in original post

0 Kudos
3 Replies
662 Views
mjbcswitzerland
Specialist V

German

The MPU is enabled by default in the K64 and other devices with it. The default setting varies for different devices but generally bus masters are not allowed to write and/or read out of the reset state.

The simplest method to allow them to operate (this is valid for USB, ENET and DMA and any other bus masters in the device) is to simply disable the MPU and is adequate for the majority of embedded projects. This will be why the demos that you have seen simply do this rather than configure access regions (which is then a bit device/project specific).

To configure an access region you can read chapter 19 of the K64 user manual which explains the operation of the region descriptors (12 available in the K64) which can be configured to allow bus master accesses to defined memory areas, whereby ENET is master 3 in the K64 (USB 4, DMA 2 and SDHC 5). The MPU can be used to protect Flash, SRAM backdoor, SRAM_L and SRAM_U frontdoors and FlexBus, or allow access to specific regions only.

If anything doesn't work as expected, look at the error address registers for the slave port in question since that gives details about what was blocked and why.

Regards

Mark

http://www.utasker.com/kinetis.html

662 Views
germanrivera
Contributor III

Thanks for your reply Mark.

I'm writing an MPU-aware RTOS for the K64F. So, I'm familiar with chapter 19 of the K64 Sub-family - Reference manual.

The information that I was missing was what bus master was the ENET. Could you please tell me where I can find more detailed information about your statement "ENET is master 4 in the K64 (USB 3, DMA 2 and SDHC 5)"?

I could not find this in the K64 ref manual. Am I missing something?

Thanks a lot again,

German

0 Kudos
663 Views
mjbcswitzerland
Specialist V

German

Search for "Bus Master Assignment" Chapter 3.3.7.2 and table 3.20

The slave port assignments are in 3.3.7.1, table 19 on the same page.

Regards

Mark

0 Kudos