2 Replies Latest reply on Oct 5, 2018 4:12 PM by BushraH_91

    S29GL128S10DHB010 Not working

      Hi,

       

      I am trying to interface NOR flash (S29GL128S10DHB010) to TMS570 by EMIF (which generate the address, data and control signal for external NOR flash.)

      I am used the following code to read manufacture id, but not getting correct data. I am getting only 0x00.

      Address mapped to external NOR flash memory is 0x60000000 to 0x6C000000.

      I could not probe the signal since the board is done by multi layer.

      Also I tried to write a single word to a memory location, it is not working, most of the time the memory is filled with value 0x0000e000.

      I am also sharing the code for write word to memory.

      Is my sequence correct ? or we have  any other method to test  ?

      void Autoselect()

      {

          uint16_t *base_addr = (uint16_t *)0x60000000;

          uint16_t *pa = (uint16_t *)0x60000000;

          uint16_t manuf_id ;

        *( (uint16_t *)base_addr + 0x555) = 0x00AA;   /* write unlock cycle 1            */

        *( (uint16_t *)base_addr + 0x2AA) = 0x0055;   /* write unlock cycle 2            */

        *( (uint16_t *)base_addr + 0x555) = 0x0090;   /* write program setup command     */

       

        manuf_id = *( (uint16_t *)base_addr + 0x000 ); /* read manuf. id */

      /*

      Autoselect exit */

      *( (uint16_t *)base_addr + 0x000 ) = 0x00F0; /* exit autoselect (write reset command) */

      }

      void program_word()

      {

          uint16_t *base_addr = (uint16_t *)0x60000000;

          uint16_t *pa = (uint16_t *)0x60000000;

          uint16_t Write_data = 0xAABB;

        *( (uint16_t *)base_addr + 0xAAA) = 0x00AA;   /* write unlock cycle 1            */

        *( (uint16_t *)base_addr + 0x555 ) = 0x0055;   /* write unlock cycle 2            */

        *( (uint16_t *)base_addr + 0xAAA) = 0x00A0;   /* write program setup command     */

        *( (uint16_t *)pa )                =  Write_data;     /* write data to be programmed     */

      }

       

      Thanks and Regards,

      Ragesh M R

        • 1. Re: S29GL128S10DHB010 Not working
          BushraH_91

          Hello Ragesh,

          Thank you for contacting Cypress Community Forum. Currently we are reviewing the code. We will get back to you as soon as we find the resolution.

           

          Have a wonderful day

          Regards,

          Bushra

          • 2. Re: S29GL128S10DHB010 Not working
            BushraH_91

            Hello Ragesh,

            The flash should be mapped to: 0x60000000 to 0x61000000 and not 0x6C000000.

            This can be an issue with the controller settings.

             

            base_addr and pa variables must have the volatile descriptor when defined, otherwise the compiler will optimize the write cycles and make one cycle out of them, which is wrong of course.

            The unlock cycles address for writing are wrong. These should be:

             

            *( (uint16_t *)base_addr + 0x555) = 0x00AA;   /* write unlock cycle 1            */

             

            *( (uint16_t *)base_addr + 0x2AA ) = 0x0055; /* write unlock cycle 2            */

             

            *( (uint16_t *)base_addr + 0x555) = 0x00A0;   /* write program setup command     */

             

             

            The polling for operation completion (programming in this case) is also missing. This can be done either using the DQ polling or using the status register. Details are in the datasheet.

             

            Thank you

            Regards,

            Bushra