MPC5748G startup.S

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

MPC5748G startup.S

868 Views
chenxiuxia
Contributor II

Hello,team :

         

        I  found  the startup.S  function that difference between the MPC5748G demos : flexcan_receive(...:\flexcan_receive\flexcan_receive_Z4_0\Project_Settings\Startup_Code),

linflexd_uart(...:\linflexd_uart\linflexd_uart_Z4_1\Project_Settings\Startup_Code).

Here the pictures are below:

1.flexcan_receive : e_b __dcache_cfg   in  the  __dcache_inv

55DED6639619AA8571ECD1747CE2723A.png

 2.  linflexd_uart : e_b __icache_cfg   in  the  __dcache_inv

0A71E164B1B9413458DCD538A122EF5E.png

Now I uesd  flexcan_receive  example  in my project,   and  we  needed  to integrate  uart(channel 2)  receive  module. linflexd_uart example  can receive the correct char which we need, but  in my project  uart ch2  always received  '0'. I contrasted these  examples,and found there is differece betwwen them  in  Startup_Code.    I  copyed the 
linflexd_uart\linflexd_uart_Z4_1\Project_Settings\Startup_Code \  startup.S  to flexcan_receive\flexcan_receive_Z4_0\Project_Settings\Startup_Code\ startup.S .At last  uart ch2   can receive the correct char which we need.

  

Why?   

0 Kudos
4 Replies

589 Views
martin_kovar
NXP Employee
NXP Employee

Hello,

I tested linflexd_uart example with both startup source files and it works correct. But the second startup ( 2.  linflexd_uart : e_b __icache_cfg   in  the  __dcache_inv) is definitely incorrect.

S32 Design Studio version 1.1 has startup fix and correct cache initialization is the first one (1.flexcan_receive : e_b __dcache_cfg   in  the  __dcache_inv). 

Could you please try to disabled cache in your project to eliminate startup difference to UART functionality?

Do you use DMA in your project?

Regards,

Martin

0 Kudos

589 Views
chenxiuxia
Contributor II

Hi,

    That's funny.   My projrct uses the second startup  that works well,  and   the first startup doesn't work well for uart mode.

0 Kudos

589 Views
martin_kovar
NXP Employee
NXP Employee

Hi,

it is very strange behavior, because the typo in cache configuration should not have any influence to UART (if you do not use DMA).

Is this the only difference in your projects?

Could you please send me two simple projects (the working one and the second which does not work) which demonstrates the issue? I would like to test it on my side.

Regards,

Martin

0 Kudos

589 Views
chenxiuxia
Contributor II

Hi,

     Please wait a few days  for me.

0 Kudos