Ethernet error for k66

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

Ethernet error for k66

602 Views
matyb
Contributor II

Good morning, I've been attempting to just initialize the ethernet module on a k66, and I think I did, however the ENET_ErrorIRQ fires up as soon as I set a bit to receive packages. I cannot figure out why I am getting this error.

The bit that I am setting is the ENET_RDAR, that's when it all goes downhill. As soon as I set this bit after initializing all of my descriptors and buffers, that's when the IRQ fires up.

I recently found that when the error IRQ fires up I get an address in the MPU_EAR1 register and some bits set in the MPU_EDR1 register. My buffers descriptor should be aligned, they start at address 0x1FFF00D0. The address error in the EAR1 register is 0x1FFF00D4, which confuses me it should have access to this address location. I tried moving the location around and still the same error. The second part, the bits set in EDR1 are 0x80000032, which to my knowledge I am not using any master-slave communication. This is all that I have on my board, I've initialized the clocks, GPIO, and Ethernet. There's nothing else being used at this moment. Can anyone give me any advice as to what may be causing this?

Thank you!

Labels (1)
Tags (1)
0 Kudos
3 Replies

457 Views
matyb
Contributor II

They were aligned correctly, after much digging and digging I found that it was the MPU_CESR register, I had to set the VLD mask to a 0, even though  it was already set to 0..? The IDE that I am using lets me see inside that register, and even going to the memory location of CESR, it was a 0. But for some reason if I reset it to a 0 it works, no bus error.

457 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi matyb:

According to K66  reference manual,  At reset, the MPU is enabled with a single region descritptor (RGD0) that maps the entire 4GB address apace with read, write and execute permissions given to the core, debugger and the DMA bus masters.

Regards

Daniel

0 Kudos

457 Views
mjbcswitzerland
Specialist V

Hi

Check the alignment of your buffer descriptors. If the ENET is causing an address error when it starts it is probably because it is polling illegally aligned buffers:
- the buffer descriptors must be aligned on 16 bytes boundaries, as do the data buffers they point to.

Regards

Mark


Kinetis: http://www.utasker.com/kinetis.html
Kinetis K66:
- http://www.utasker.com/kinetis/TWR-K65F180M.html
- http://www.utasker.com/kinetis/FRDM-K66F.html
- http://www.utasker.com/kinetis/TEENSY_3.6.html

Networking: http://www.utasker.com/docs/uTasker/uTaskerNetworking.pdf

Free Open Source solution: https://github.com/uTasker/uTasker-Kinetis
Working project in 15 minutes video: https://youtu.be/K8ScSgpgQ6M

For better, faster, cheaper product developments consider the uTasker developer's version, professional Kinetis support, one-on-one training and complete fast-track project solutions to set you apart from the herd : http://www.utasker.com/support.html

0 Kudos