SW Reset not successfully performed

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

SW Reset not successfully performed

2,115 Views
BlueJay
Contributor III

Hi,

I currently face with following behaviour of Vybrid VF6xx

On our HW target the 4SPI1 interface is used for system boot.

After initializing 4SPI1 interface and doing flash read by using AHB cmd read, the µP Vybrid VF6xx doesn´t successfully restart after a SW reset, a power cycle is required.

The sequence is as follows: ( a simply blinking programm with dummy flash access)

qspi_vInit();     //initialize 4SPI1 interface as vybrid sample code (4SPI 0 interface)

qspi_vReadFlashData();     //read data from flash via AHB: RAMbuffer[0] = *ptrFlash (e.g. 0x5000 0000 for 4SPI1 flash)

doSWReset();          //SRC->SCR |= (SRC_SCR_SW_RST_MASK | SRC_SCR_CA5_WDGRST_MASK(0xA) | SRC_SCR_CM4_WDGRST_MASK(0xA));

As workaround a dummy read of flash status byte by using IP cmd read is required, afterward the Vybrid successfully restarts.

I think the same behaviour can be also reproduced at 4SPI0 interface.

I would like to know what is the reason for the failed SW reset (without the above mentioned workaround) ?

Is there any other option for a SW reset without the workaround mentioned above ?

Thank you in advance for any clarification.

Tai-Phan


Labels (1)
14 Replies

1,822 Views
timesyssupport
Senior Contributor II

Hello,

Could you describe your hardware (vendor, eval-kit, custom?), U-boot and kernel version please?

Thank you,

Timesys Support

0 Kudos
Reply

1,822 Views
BlueJay
Contributor III

Hello,

it is about a hardware designed by us whereat the flash device (Spansion S25FL128) locates at 4SPI 1 interface of Vybrid VF6xx.

For the behaviour mentioned above a simple SW (without kernel) with blinking LED with a suitable IVT is created:


static VOID lvl_vTestingSWReset(void)
{
  BOOL oErrStatus;
  //initialize 4spi 1 interface
  qspi_vInit();
  oErrStatus
= lvl_oReadFlashData();//read flash with AHB read cmd: RAMbuffer[0] = *ptrFlash
  //qspi_u32Read2ndStatusByte();//dummy IP cmd read of flash status: run with this workaround after previous flash access via AHB

  do
 
{
      LVL_STATUS_LED_ON();
     
__asm("nop");
      time_delay_local(
0xFFFFF);
     
__asm("nop");
      LVL_STATUS_LED_OFF();
     
__asm("nop");
      time_delay_local(
0xFFFFF);
     
__asm("nop");
     
if (LVL_GET_UPDATE_ENABLE() != 0)//SW reset botton pressed ?

      {
        time_delay_local(
0x1FFFFF);
        lvl_vSWReset();
     
}       
 
}
 
while(1);
}


Best regards,

Tai-Phan

0 Kudos
Reply

1,822 Views
karina_valencia
NXP Apps Support
NXP Apps Support

timesyssupport​ can you continue with the follow up?

0 Kudos
Reply

1,822 Views
timesyssupport
Senior Contributor II

Hello BlueJay​,

This still seems to be bare-metal code, we are tasked with Linux support for Vybrid VF6xx. Is this issue also present when running a Linux kernel?

Timesys Support

0 Kudos
Reply

1,822 Views
BlueJay
Contributor III

Hello,

since we don´t use a Linux kernel, so I cannot tell you if it is also present there.

The init-routine for the 4SPI interface can be found in vybrid sample code, or as 4spi driver in mfg-tool.

Best regards,

Tai-Phan

0 Kudos
Reply

1,822 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi Tai-Phan,

In the meantime I wonder if it is possible to share your code. Just the QSPI initialization as well as the QSPI read command.

/Alejandro

0 Kudos
Reply

1,822 Views
BlueJay
Contributor III

Hi Alejandro,

I would like to share the code but I need time to prepare it since there are lots of dependency in the IAR EW project.

Basically the main-function is consisted only lvl_vTestingSWReset (see above), QuadSPI interface init modul for Vybrid.

Do you get any simple & executable project, e. g. IAR EW project with start-up and main() for vybrid VF6xx ? Maybe the blinking LED example for vybrid tower ?

And it shall contain a valid IVT for QuadSPI (I use 4spi 1 interface of Vybrid) to load it into 4spi flash.

Cheers,

Tai-Phan

0 Kudos
Reply

1,822 Views
alejandrolozan1
NXP Employee
NXP Employee

I belive that you can easily modify the hello_world examle found here:

Sample Code for Vybrid Controller Tower System

The hello_world project contains already the IVT and the QSPI memory configuration.

/Alejandro

0 Kudos
Reply

1,822 Views
BlueJay
Contributor III

Hi Alejandro,

I could find the project with the sample code und could adapt the "hello world" sample for testing SW reset with tower HW and 4SPI interface 0.

Unfortunately I could not re-produce the behaviour as I could get it at 4SPI interface 1.

We currently try to modify the tower HW such that the flash is at 4SPI interface 1 of Vybrid, lets see if I could re-produce the behaviour.

I will let you know then.

Cheers,

Tai-Phan 

0 Kudos
Reply

1,822 Views
alejandrolozan1
NXP Employee
NXP Employee

Ok, please do not hesitate to contact us.

/Alejandro

0 Kudos
Reply

1,822 Views
timesyssupport
Senior Contributor II

Sorry Tai-Phan, we are only able to suppot Vybrid running Linux. karinavalencia​ who would be best to assist here?

Thanks,

Timesys Support

0 Kudos
Reply

1,822 Views
karina_valencia
NXP Apps Support
NXP Apps Support

alejandrolozano​ can you  help to  review this case sharing  some  guidelines?

0 Kudos
Reply

1,822 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi Karina,

Sure, I can help. I will need some time to delve into it.

Best Regards,

Alejandro

1,822 Views
karina_valencia
NXP Apps Support
NXP Apps Support

timesyssupport​ can you  help here?

0 Kudos
Reply