1 2 3 Previous Next 34 Replies Latest reply on Aug 9, 2019 4:15 AM by SudheeshK_26 Go to original post
      • 16. Re: S29GL256S10DHV020  is not writing to the FLASH .
        SudheeshK_26

        Hi,

         

        Could you please let us know the value configured in register CE2CFG? Please make sure that the field ASIZE in this register is configured for 16 bit bus.

         

        Thanks and Regards,

        Sudheesh

        • 17. Re: S29GL256S10DHV020  is not writing to the FLASH .
          CHKA_4329876

          Hi ,

           

          Yes the value configured in register CE2CFG for ASIZE in this register is configured for 16 bit bus .

           

          void emif_ASYNC2Init(void)

          {

          /* USER CODE BEGIN (6) */

          /* USER CODE END */

           

           

              emifREG->CE3CFG = 0x00000000U;

              emifREG->CE3CFG = (uint32)((uint32)0U << 31U)|

                                (uint32)((uint32)0U << 30U)|

                                (uint32)((uint32)14U << 26U)|

                                (uint32)((uint32)110U << 20U)|

                                (uint32)((uint32)110U << 17U)|

                                (uint32)((uint32)14U << 13U)|

                                (uint32)((uint32)110U << 7U)|

                                (uint32)((uint32)110U << 4U)|

                                (uint32)((uint32)0U << 2U)|

                                (uint32)((uint32)emif_16_bit_port);

           

           

              emifREG->AWCC   = (emifREG->AWCC & 0xC0FF0000U)|

                                (uint32)((uint32)emif_pin_low << 29U)|

                                (uint32)((uint32)emif_pin_low << 28U)|

                                (uint32)((uint32)emif_wait_pin1 << 18U)|

                                (uint32)((uint32)2U);

           

           

              emifREG->PMCR   = (emifREG->PMCR & 0xFFFF00FFU)|

                                (uint32)((uint32)0U << 10U)|

                                (uint32)((uint32)emif_8_words << 9U)|

                                (uint32)((uint32)0U << 8U);

          /* USER CODE BEGIN (7) */

          /* USER CODE END */

           

           

          }

           

           

          One Additional Query is for the LLD driver I am selecting following configuration . Is this configuration correct for our Hardware .

           

            #define LLD_CONFIGURATION_X32_AS_X32   /* no-interleaving, a single x32 device in x32 mode  */

           

          The following SDRAM is also connected on the Hardware that works perfectly . The BA0 and BA1 will be used different functionality on the SDRAM .

           

          • 18. Re: S29GL256S10DHV020  is not writing to the FLASH .
            CHKA_4329876

            Yes the value configured in register CE2CFG for ASIZE in this register is configured for 16 bit bus .

             

             

             

            void emif_ASYNC1Init(void)

            {

            /* USER CODE BEGIN (4) */

            /* USER CODE END */

                emifREG->CE2CFG = 0x00000000U;

                emifREG->CE2CFG = (uint32)((uint32)0U << 31U)|

                                  (uint32)((uint32)0U << 30U)|

                                  (uint32)((uint32)14U << 26U)|

                                  (uint32)((uint32)110U << 20U)|

                                  (uint32)((uint32)110U << 17U)|

                                  (uint32)((uint32)14U << 13U)|

                                  (uint32)((uint32)110U << 7U)|

                                  (uint32)((uint32)110U << 4U)|

                                  (uint32)((uint32)0U << 2U)|

                                  (uint32)((uint32)emif_16_bit_port);

             

             

                emifREG->AWCC   = (emifREG->AWCC & 0xC0FF0000U)|

                                  (uint32)((uint32)emif_pin_low << 29U)|

                                  (uint32)((uint32)emif_pin_low << 28U)|

                                  (uint32)((uint32)emif_wait_pin1 << 16U)|

                                  (uint32)((uint32)2U);

             

             

                emifREG->PMCR   = (emifREG->PMCR & 0xFFFFFF00U)|

                                  (uint32)((uint32)0U << 2U)|

                                  (uint32)((uint32)emif_8_words << 1U)|

                                  (uint32)((uint32)0U);

            /* USER CODE BEGIN (5) */

            /* USER CODE END */

            }

            • 19. Re: S29GL256S10DHV020  is not writing to the FLASH .
              SudheeshK_26

              Hi,

               

              Thank you for the details. The CE2CFG configuration looks OK. As S29GL256S is a single x16 device, you should be using below configuration in LLD,

              "#define LLD_CONFIGURATION_X16_AS_X16    /* no-interleaving, a single x16 device in x16 mode  */"

               

              NOT "#define LLD_CONFIGURATION_X32_AS_X32   /* no-interleaving, a single x32 device in x32 mode  */"

               

              Please make the change and let us know, if you can access our flash device.

               

              Thanks and Regards,

              Sudheesh

              • 20. Re: S29GL256S10DHV020  is not writing to the FLASH .
                CHKA_4329876

                The NOR FLASH device is not responding With the applied configuration

                "#define LLD_CONFIGURATION_X16_AS_X16    /* no-interleaving, a single x16 device in x16 mode  */"

                 

                Can you confirm the following values for NOR FLASH

                the EMIF clock is configured at 90 MHz .

                 

                WRITE_SETUP

                WRITE_STROBE

                WRITE_HOLD

                READ_SETUP

                READ_STROBE

                READ_HOLD

                 

                Should Select Strobe Mode turned ON ?

                Extended Wait required tobe ON?

                 

                Tavav is 110 ns

                Tehel is 20 ns

                 

                 

                Are these correct timings

                Write setup = 2h

                Write strobe = 6h

                Write hold = 1h

                Read setup = 1h

                Read Strobe = 11 h

                Read hold= 3h

                TA= 3h

                 

                • 21. Re: S29GL256S10DHV020  is not writing to the FLASH .
                  SudheeshK_26

                  Hi,

                   

                  Your read/write timing configuration look OK.

                   

                  Write setup = 2h

                  Write strobe = 6h

                  Write hold = 1h

                  Read setup = 1h

                  Read Strobe = 11 h

                  Read hold= 3h

                  TA= 3h

                   

                  Can you provide more details about "The NOR FLASH device is not responding With the applied configuration"? What is the data that you read from flash device using function "lld_GetDeviceId()"?

                   

                  Thanks and Regards,

                  Sudheesh

                  • 22. Re: S29GL256S10DHV020  is not writing to the FLASH .
                    CHKA_4329876

                    Hi Sudheesh ,

                     

                    Appreciate your support on the NOR FLASH issue  .

                    My Explanation was not with enough Clarity .

                     

                    The address 0x60000000 can be read as all values set to 0xFFFF  ( these values should be the default erase values on the CHIP ).

                    Any read to the Address 0x60000000 to 32 MB returns 0xFFFF .

                     

                    The lld_GetDeviceId() also returns 0xFFFF . Attached images debug window explains the values being read as 0xFFFF .

                    I am also sharing the source code in Gdrive , if you have any other services to share the source files do let me know I will share trough that means .

                     

                    EMIF NOR FLASH at 0x60000000.png

                     

                    EMIF_testing.zip - Google Drive

                    • 23. Re: S29GL256S10DHV020  is not writing to the FLASH .
                      SudheeshK_26

                      Hi,

                       

                      Can you share the waveform for a single read and write operation to the flash device? Can you capture all the signals between controller and flash device and send to us, if you have a logic analyzer? If you do not have a logic analyzer, please capture below signal for read and write operations respectively.

                       

                      Read operation: BA1 (A0 of flash), A0 (A1 of flash), A1 (A2 of flash), CE#, OE#, DQ0, DQ1

                      Write operation: BA1 (A0 of flash), A0 (A1 of flash), A1 (A2 of flash), CE#, WE#, DQ0, DQ1

                       

                      Thanks and Regards,

                      Sudheesh

                      • 24. Re: S29GL256S10DHV020  is not writing to the FLASH .
                        CHKA_4329876

                        Hi ,

                         

                        I Cannot Access the Exact Lines what you have requested on the Production Board . We have and TMS570LS3137 HDK that has access to all lines  . There are differences from what you have requested .

                         

                        base_addr is 0x60000000

                         

                        SCOPE PLOT 1:

                        FLASH_WR(base_addr, LLD_UNLOCK_ADDR1, NOR_UNLOCK_DATA1);

                        (*(( (volatile FLASHDATA*)((base_addr)) ) + ((0x00000555)))) = (((0xAA)*0x00000001))

                        Write operation: BA1 (A0 of flash), A0 (A1 of flash), A1 (A2 of flash), A2 (A3 of flash), CS2, WE#, DATA0, DATA1

                         

                        void emif_ASYNC2Init(void)

                        {

                            emifREG->CE3CFG = 0x00000000U;

                            emifREG->CE3CFG = (uint32)((uint32)1U << 31U)|

                                              (uint32)((uint32)0U << 30U)|

                                              (uint32)((uint32)2U << 26U)|

                                              (uint32)((uint32)6U << 20U)|

                                              (uint32)((uint32)1U << 17U)|

                                              (uint32)((uint32)1U << 13U)|

                                              (uint32)((uint32)11U << 7U)|

                                              (uint32)((uint32)3U << 4U)|

                                              (uint32)((uint32)3U << 2U)|

                                              (uint32)((uint32)emif_16_bit_port);

                         

                            emifREG->AWCC   = (emifREG->AWCC & 0xC0FF0000U)|

                                              (uint32)((uint32)emif_pin_low << 29U)|

                                              (uint32)((uint32)emif_pin_low << 28U)|

                                              (uint32)((uint32)emif_wait_pin1 << 18U)|

                                              (uint32)((uint32)0U);

                         

                            emifREG->PMCR   = (emifREG->PMCR & 0xFFFF00FFU)|

                                              (uint32)((uint32)0U << 10U)|

                                              (uint32)((uint32)emif_8_words << 9U)|

                                              (uint32)((uint32)0U << 8U);

                        }

                        tek0000.png

                         

                        ZOOM 100x

                        tek0001.png

                         

                         

                        SCOPE PLOT 2:

                          FLASH_WR(base_addr, LLD_UNLOCK_ADDR2, NOR_UNLOCK_DATA2);

                        (*(( (volatile FLASHDATA*)((base_addr)) ) + ((0x000002AA)))) = (((0x55)*0x00000001))

                         

                         

                        tek0000.png

                        Zoom In 100x

                        tek0001.png

                         

                         

                         

                        Read operation: BA1 (A0 of flash), A0 (A1 of flash), A1 (A2 of flash), A2 (A3 of flash), CS2, OE#, DQ0, DQ1

                        (*(( (volatile FLASHDATA*)((base_addr)) ) + ((0x008E))))

                         

                        tek0000.png

                         

                        ZOOM 100x

                         

                        tek0001.png

                        • 25. Re: S29GL256S10DHV020  is not writing to the FLASH .
                          CHKA_4329876

                          Above mentioned Scope plots are with Strobe Mode ON .

                          SECTION : Following are Scope plots with Strobe Mode OFF

                          void emif_ASYNC1Init(void)
                          {

                           

                          emifREG->CE2CFG = 0x00000000U;
                          emifREG->CE2CFG = (uint32)((uint32)0U << 31U)|
                          (uint32)((uint32)0U << 30U)|
                          (uint32)((uint32)2U << 26U)|
                          (uint32)((uint32)6U << 20U)|
                          (uint32)((uint32)1U << 17U)|
                          (uint32)((uint32)1U << 13U)|
                          (uint32)((uint32)11U << 7U)|
                          (uint32)((uint32)3U << 4U)|
                          (uint32)((uint32)3U << 2U)|
                          (uint32)((uint32)emif_16_bit_port);

                          emifREG->AWCC = (emifREG->AWCC & 0xC0FF0000U)|
                          (uint32)((uint32)emif_pin_low << 29U)|
                          (uint32)((uint32)emif_pin_low << 28U)|
                          (uint32)((uint32)emif_wait_pin1 << 16U)|
                          (uint32)((uint32)0U);

                          emifREG->PMCR = (emifREG->PMCR & 0xFFFFFF00U)|
                          (uint32)((uint32)0U << 2U)|
                          (uint32)((uint32)emif_8_words << 1U)|
                          (uint32)((uint32)0U);
                          }

                           

                           

                          FLASH_WR(base_addr, LLD_UNLOCK_ADDR1, NOR_UNLOCK_DATA1);

                           

                           

                           

                          (*(( (volatile FLASHDATA*)((base_addr)) ) + ((0x00000555)))) = (((0xAA)*0x00000001))

                           

                           

                           

                          Write operation:

                           

                          SIGNAL 0 = BA1 (A0 of flash),

                           

                          SIGNAL 1 = A0 (A1 of flash),

                           

                          SIGNAL 2= A1 (A2 of flash),

                           

                          SIGNAL 3= A2 (A3 of flash),

                           

                          SIGNAL 4= CS2,

                           

                          SIGNAL 5= WE#,

                           

                          SIGNAL6= DATA0,

                           

                          SIGNAL7 = DATA1

                           


                           

                           

                           

                          SCOPE PLOT 2:

                           

                            FLASH_WR(base_addr, LLD_UNLOCK_ADDR2, NOR_UNLOCK_DATA2);

                           

                          (*(( (volatile FLASHDATA*)((base_addr)) ) + ((0x000002AA)))) = (((0x55)*0x00000001))

                           

                           

                          • 26. Re: S29GL256S10DHV020  is not writing to the FLASH .
                            SudheeshK_26

                            Hi,

                             

                            Thank you for the waveform for write and read operations. We observed that there is 3 write cycles corresponding to a single write command. Please see below.

                            This is the scope shot that you attached for below write operation in the source code.

                            FLASH_WR(base_addr, LLD_UNLOCK_ADDR1, NOR_UNLOCK_DATA1);

                            (*(( (volatile FLASHDATA*)((base_addr)) ) + ((0x00000555)))) = (((0xAA)*0x00000001))

                             

                            Please clarify, why there are 3 write cycles (WC1..3) for a single write operation?

                             

                            Thanks and Regards,

                            Sudheesh

                            • 27. Re: S29GL256S10DHV020  is not writing to the FLASH .
                              CHKA_4329876

                              Hi Sudheesh ,

                               

                              Thanks for Mentioning this Finding .

                              Please give some time to get the response from Texas Instruments . As I am following what Texas instruments is suggesting to implement the EMIF Initialization steps.

                               

                              Thanks and Warm Regards ,

                              • 28. Re: S29GL256S10DHV020  is not writing to the FLASH .
                                CHKA_4329876

                                Hi Sudheesh ,

                                 

                                I will tomorrow work on the LLD migration to our project . I was able to fix the WE# issue on the EMIF and able to read following data from NOR FLASH .

                                 

                                I will have to verify the timings and also the consistency of writes and read to NOR FLASH tomorrow .

                                 

                                 

                                at 45MHz EMIF clock frequency I have set following values , can you confirm if these are correct .

                                 

                                    emifREG->CE2CFG = (uint32)((uint32)0U << 31U)|

                                                      (uint32)((uint32)0U << 30U)|

                                                      (uint32)((uint32)8U << 26U)|  // Write Setup

                                                      (uint32)((uint32)24U << 20U)| // Write Strobe

                                                      (uint32)((uint32)4U << 17U)| // Write Hold

                                                      (uint32)((uint32)4U << 13U)| // Read Setup

                                                      (uint32)((uint32)44U << 7U)| // Read Strobe

                                                      (uint32)((uint32)12U << 4U)|  // Read Hold

                                                      (uint32)((uint32)12U << 2U)| // TA

                                                      (uint32)((uint32)emif_16_bit_port);

                                 

                                 

                                Following are 2 screenshots of the NOR FLASH  tek0017.png

                                WORKING 1.png

                                WORKING 2.png

                                • 29. Re: S29GL256S10DHV020  is not writing to the FLASH .
                                  SudheeshK_26

                                  Hi,

                                   

                                  Register settings looks OK. Please let us know the test results, if you face any issues.

                                   

                                  Thanks and Regards,

                                  Sudheesh