FEC not working with S32DS

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

FEC not working with S32DS

1,494 Views
adrianonea
Contributor III

I am trying to port FNET to S32R274/S32DS. The FEC does not seem to work properly. I have a ENET driver sample from NXP/Martin and that does not work either. I wonder if there is any incompatibility between S32Ds and the FEC on S32R274/MPC577xK.

So far the timer interrupt did not work in multi core mode. converted the project to single core and it works, thank you Martin.

Can I have the full project for the ENET dirver compiled with D32Ds?

Tags (2)
7 Replies

1,043 Views
martin_kovar
NXP Employee
NXP Employee

Hello Adrian,

could you please more clarify the issue you have? What does it mean that FEC does not work properly?

Only known issue we found is described in thread below (read my last post):

enet function cause censored on s32r 

You can also try to check this thread:

https://community.nxp.com/message/863154 

Regards,

Martin

1,043 Views
adrianonea
Contributor III

Martin,Thank you for your response. I will first describe the problem:I have a demo board with MR3003 that is branded NXP but comes from a Swiss company that designed the RF part. It came with code compiled with GHS (Green Hills) and it does work though at times does not startup reliably. I am trying to port the code to S32DS. It is a good exercise as I have picked up a few of the startup problems.The problem I have at the moment when I go through the debugger and check the buffer descriptors things don't happen as they should. I have data in the tx buffer and the length and status are correct but the message is not sent out or I know message are sent on the network and they are not received. Ocassionally I get an ARP with a response and response to two pings out of 4. This tells me that the hardware pins are configured correctly.

I suspect the problem is caching the rx and tx buffs and buffer descriptors and don't know how to disable that. Declared them as "volatile" but not sure the compiler is doing anything.

I have not seen any non cacheble section in the flash.ld file nor any sequence that configures a non cacheble section of the memory so that I can put the buffers (or the compiler can do it automatically) in that section.

1. I was hoping that if you can give me the whole project of your ENET driver and that works under S32DS I can do most of the work myself.2. can you give me any support/examples on how to create a non cacheble section under S32DS.3. I have attached the code I am using which is a fnet 3.8.3dev version I am working on and Andrey is helping me. if just initializes the stack and needs to respond to pings.The board I have does not have an XOSC and relies on the 40 MHz clock to come from MR3003. If your's has the XOSC then you can get rid of the MR3003 init code.You may also have to remap the I/O pins to match your hardware.

I have disabled the interrupts so it is all working in pool mode. You can put the interrupts back by:mpc/fnet_mps_isr_inst.c comment out the line that returns in case the vector is 218,in the Interrupt vector file comment out the "dummy" line and put the fnet_isr_handler in vector no 218in the fnet_poll_service comment out the fec_poll function.in the fnet_fec_init function enable the interrups.

I can give you the interrupt driven version but this way is simpler to debug.The timer interrupt is still running.I put the break point in the tx function. Gets called in the beggining to send an ARP message and sometimes the ARP message gets through.One break point in the receive function. An initial response to ARP or an ARP message from the peer arrives but it is not being processed.

From: b55689 <admin@community.nxp.com>

To: adrian onea <adrian_onea@yahoo.com>

Sent: Tuesday, 13 June 2017, 23:19

Subject: Re: - Re: FEC not working with S32DS

#yiv6213487212 * #yiv6213487212 a #yiv6213487212 body {font-family:Helvetica, Arial, sans-serif;}#yiv6213487212 #yiv6213487212 h1, #yiv6213487212 h2, #yiv6213487212 h3, #yiv6213487212 h4, #yiv6213487212 h5, #yiv6213487212 h6, #yiv6213487212 p, #yiv6213487212 hr {}#yiv6213487212 .yiv6213487212button td {}

|

NXP Community

|

Re: FEC not working with S32DS

reply from Martin Kovar in MPC5xxx - View the full discussionHello Adrian, could you please more clarify the issue you have? What does it mean that FEC does not work properly? Only known issue we found is described in thread below (read my last post):enet function cause censored on s32r  You can also try to check this thread:ENET_UDP_Tx problem in on S32R274  Regards,Martin

Reply to this message by replying to this email, or go to the message on NXP Community

Start a new discussion in MPC5xxx by email or at NXP Community

Following Re: FEC not working with S32DS in these streams: Inbox

This email was sent by NXP Community because you are a registered user.

You may unsubscribe instantly from NXP Community, or adjust email frequency in your email preferences |

|

0 Kudos

1,043 Views
martin_kovar
NXP Employee
NXP Employee

Hello Adrian,

Your problem is a little bit complicated and it is out of my time scope to browse the code and search for mistakes, but I can provide you some examples.

1) I am attaching you ENET driver from application team. This driver is created for MPC5775K, but it will be also usable for S32R with some little changes.

2) Please see the example below, which shoes how to configure SMPU to create non-cachable memory area.

Example MPC5748G SMPU initialization 

Hope it helps you at least a little.

Regards,

Martin

1,043 Views
adrianonea
Contributor III

also the example is only the driver. does not include the main and the whole project. i was hoping to see how the buffer descriptors are made un cacheble.

From: b55689 <admin@community.nxp.com>

To: adrian onea <adrian_onea@yahoo.com>

Sent: Tuesday, 20 June 2017, 23:26

Subject: Re: - Re: FEC not working with S32DS

#yiv4487027104 * #yiv4487027104 a #yiv4487027104 body {font-family:Helvetica, Arial, sans-serif;}#yiv4487027104 #yiv4487027104 h1, #yiv4487027104 h2, #yiv4487027104 h3, #yiv4487027104 h4, #yiv4487027104 h5, #yiv4487027104 h6, #yiv4487027104 p, #yiv4487027104 hr {}#yiv4487027104 .yiv4487027104button td {}

|

NXP Community

|

Re: FEC not working with S32DS

reply from Martin Kovar in MPC5xxx - View the full discussionHello Adrian, Your problem is a little bit complicated and it is out of my time scope to browse the code and search for mistakes, but I can provide you some examples. 1) I am attaching you ENET driver from application team. This driver is created for MPC5775K, but it will be also usable for S32R with some little changes. 2) Please see the example below, which shoes how to configure SMPU to create non-cachable memory area.Example MPC5748G SMPU initialization  Hope it helps you at least a little. Regards,Martin

Reply to this message by replying to this email, or go to the message on NXP Community

Start a new discussion in MPC5xxx by email or at NXP Community

Following Re: FEC not working with S32DS in these streams: Inbox

This email was sent by NXP Community because you are a registered user.

You may unsubscribe instantly from NXP Community, or adjust email frequency in your email preferences |

|

0 Kudos

1,043 Views
martin_kovar
NXP Employee
NXP Employee

Hello Adrian,

if you set variable as volatile, it means, that this variable will be always placed in RAM memory. If variable is not volatile, compiler can optimize it from RAM and place it to register only.

There is not any "uncachable" section. There is SPMU which allows you to mark some part of memory uncachable. This should be used for memory, where buffer descriptors are stored and also for memory, where transmitted and received frames are stored.

About example, unfortunately, we do not have this complex example. The only things I can provide you are these ones I mentioned in my post above.

Maybe, when you search community, you can find something usable. Please see thread below:

https://community.nxp.com/message/618724 

Regards,

Martin

1,043 Views
adrianonea
Contributor III

Thank you Martin, I have gone through a few support requests and many developers had problems with the cache. It is very much the same problem when you want to share memory. I think it could be a very useful feature to have a "non cacheable" section in the automatically generated code especially that the cache enabling for both instruction and data is in the assembler startup code.

I have read the SMPU, Cache and MMU sections and I do have a few questions. I will start a new thread.

Thank you again,Adrian

From: b55689 <admin@community.nxp.com>

To: adrian onea <adrian_onea@yahoo.com>

Sent: Thursday, 22 June 2017, 22:52

Subject: Re: - Re: FEC not working with S32DS

#yiv7073335146 * #yiv7073335146 a #yiv7073335146 body {font-family:Helvetica, Arial, sans-serif;}#yiv7073335146 #yiv7073335146 h1, #yiv7073335146 h2, #yiv7073335146 h3, #yiv7073335146 h4, #yiv7073335146 h5, #yiv7073335146 h6, #yiv7073335146 p, #yiv7073335146 hr {}#yiv7073335146 .yiv7073335146button td {}

|

NXP Community

|

Re: FEC not working with S32DS

reply from Martin Kovar in MPC5xxx - View the full discussionHello Adrian, if you set variable as volatile, it means, that this variable will be always placed in RAM memory. If variable is not volatile, compiler can optimize it from RAM and place it to register only. There is not any "uncachable" section. There is SPMU which allows you to mark some part of memory uncachable. This should be used for memory, where buffer descriptors are stored and also for memory, where transmitted and received frames are stored. About example, unfortunately, we do not have this complex example. The only things I can provide you are these ones I mentioned in my post above. Maybe, when you search community, you can find something usable. Please see thread below:MPC5748G ENET  Regards,Martin

Reply to this message by replying to this email, or go to the message on NXP Community

Start a new discussion in MPC5xxx by email or at NXP Community

Following Re: FEC not working with S32DS in these streams: Inbox

This email was sent by NXP Community because you are a registered user.

You may unsubscribe instantly from NXP Community, or adjust email frequency in your email preferences |

|

0 Kudos

1,043 Views
adrianonea
Contributor III

The questions are:What happens with a variable declared volatile?

Is is there an "uncacheble" section where you can put your variables if you don't want them cached?

Is such a section programmed in the startup.s

From: b55689 <admin@community.nxp.com>

To: adrian onea <adrian_onea@yahoo.com>

Sent: Tuesday, 20 June 2017, 23:26

Subject: Re: - Re: FEC not working with S32DS

#yiv1776545190 * #yiv1776545190 a #yiv1776545190 body {font-family:Helvetica, Arial, sans-serif;}#yiv1776545190 #yiv1776545190 h1, #yiv1776545190 h2, #yiv1776545190 h3, #yiv1776545190 h4, #yiv1776545190 h5, #yiv1776545190 h6, #yiv1776545190 p, #yiv1776545190 hr {}#yiv1776545190 .yiv1776545190button td {}

|

NXP Community

|

Re: FEC not working with S32DS

reply from Martin Kovar in MPC5xxx - View the full discussionHello Adrian, Your problem is a little bit complicated and it is out of my time scope to browse the code and search for mistakes, but I can provide you some examples. 1) I am attaching you ENET driver from application team. This driver is created for MPC5775K, but it will be also usable for S32R with some little changes. 2) Please see the example below, which shoes how to configure SMPU to create non-cachable memory area.Example MPC5748G SMPU initialization  Hope it helps you at least a little. Regards,Martin

Reply to this message by replying to this email, or go to the message on NXP Community

Start a new discussion in MPC5xxx by email or at NXP Community

Following Re: FEC not working with S32DS in these streams: Inbox

This email was sent by NXP Community because you are a registered user.

You may unsubscribe instantly from NXP Community, or adjust email frequency in your email preferences |

|

0 Kudos