DSMC swap instruction does not work as expected on MPC574xG

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

DSMC swap instruction does not work as expected on MPC574xG

772 Views
martinschulthei
Contributor III

Dear NXP Support,

we're trying to implement a swap routine by using the DSMC Module.
Therefore we want to use the lwdcbx asm instruction.
We're using the following code to do this (Greenhills Assembler Macro):

__asm uint32 Hal_Swap(uint32 Addr, uint32 Value)
{
%reg Addr %con Value
  /* prepare the decoration for the SWAP instruction */
  se_li    r6, Value           /* load value in r6 */
  e_lis    r5, 0x5000          /* r5 = 0x50000000 */
  se_or    r6, r5              /* Value = Value | r5 */
  /* lwdcbx -> Load Word Decorated with Cache Bypass */
  lwdcbx   r3, r6, Addr        /* SWAP Addr with r3 */
%error
}

We expect the following behavior (as described in MPC5748GRM Rev. 4, 07/2015 - Chapter 18.4.1.2.2):
1. The "old" value of Addr is stored in r3
2. The value of r5 (WD28 in r6) is stored at Addr.

What we get is only the old value in r3, but no storage operation is performed at Addr.

We are using the following Micro:
PPC5748GSK0MMJ6
0N65H
CTZGS1329A

Thanks in advance and best regards,
Martin Schultheiß

Tags (3)
0 Kudos
1 Reply

524 Views
martinschulthei
Contributor III

Hello,

I just get the information, that MPC5748G Cut1 does not support the DSMC.

I think this is the reason for the described behavior.

Thanks and Best Regards,

Martin

0 Kudos