8 Replies Latest reply on Jul 30, 2018 2:10 AM by BacemD_61

    S29GL128S90FHI010 with Blackfin BF609

      Hi There ;

       

      We are working on a project. In our project, we use "CYPRESS S29GL128S90FHI010" model parallel NOR FLASH chip. We connected this chip to Analog Devices' Blackfin BF609 DSP's static memory controller (SMC0 BASEADRESS=0xB0000000 Bank0),(I share the schematic of the PCB we make ). We downloaded the "Spansion_LLD_Device_v15.3.1" Low-level driver from your website and we added to the project.  But I have not been able to make the right configuration.I wrote ram a while trying to write to flash.  and we try to run the following code, but we have not read the ID in the datasheet.  Could you help me with the configuration.

       

      ///////////////////////////////////////////////////////////////////////////////////////////////////////////

      unsigned int data_read;

      LLD_CHAR versionStr[9];

      lld_GetVersion(versionStr);

      printf(" LLD Release Version: %s \n", versionStr);

      data_read = lld_GetDeviceId (   (FLASHDATA)0xB0000000    );

      printf  ("%8.8X \n", data_read   );

      //////////////////////////////////////////////////////////////////////////////////////////////////

       

      I shared to Blackfin SMC Features and registers details.

       

      Blackfin SMC Features:

      • 16-bit I/O width

      • Provides flexible timing control through extended timing parameters

      • Supports asynchronous access extension ( SMC_ARDY pin)

      • Supports 8-bit data masking writes

      • Supports bus request/grant arbitration

      • Supports burst read with programmable burst length of 4, 8 and 16

       

      Blackfin SMC_Bank0 Registers:(Additional details are available on attachment)

      SMC_B0CTL Bank 0 Control Register

      SMC_B0TIM Bank 0 Timing Register

      SMC_B0ETIM Bank 0 Extended Timing Register

        • 1. Re: S29GL128S90FHI010 with Blackfin BF609
          BushraH_91

          Hello Ahmet,

          Thank you for contacting Cypress Community Forum. We have received your inquiry and currently reviewing the issue. We will get back to you as soon as we find the resolution.

           

          Have a wonderful day

          Regards,

          Bushra

          • 2. Re: S29GL128S90FHI010 with Blackfin BF609
            BacemD_61

            Hello Ahmet,

             

            The RY/BY# should have a pull-up resistor and not both pull-up and pull-down, otherwise when left tristated, the controller will see it at VCC/2.

             

            Are you using the LLD for the GL-S?

            What are you getting as device ID?

            Please provide the Logic Analyzer traces and we can look at those? (CE#, OE#, WE#, ADDR, DATA).

             

            Best regards,

            Bacem

            ----

            Bacem Daassi

            Cypress Semiconductor Corp.

            Customer Application Engineering

            1 of 1 people found this helpful
            • 3. Re: S29GL128S90FHI010 with Blackfin BF609

              We apologize for the delay. We fixed the connection of the RY / BY signal and we tried again but the result did not change.

              We use LLD Version 15.3.1 Driver

              And Device Driver Folder "S29GLxxxS".

              There is a picture of the board we designed.

               

               

              We run just this code  "FLASHDATA *Baseaddr=0xb0000000                    ;

                                                      data_read = lld_GetDeviceId (   Baseaddr  )        ;     

                                                       printf  ("%8.8X \n", data_read   )                          ;  "

              as a result, we read 0x00559090 for Device ID.

               

              I give the setting values of my Blackfin SMC controller in the picture.(CoreCLK=200mhz ; Sclk=100Mhz)

              We changed the file "lld_target_specific.h" as shown in the picture.

               

               

              we tried to examine the signals "CE #, OE #, WE #, ADDR, DATA" with the logic analyzer.

              However, due to the board structure, we could not examine the "ADDR, DATA" signals.

              I share screenshots of the returning signals. IMG_20180724_123923.jpg

              ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

              'lld_target_specific.h'  config.PNG

              ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

              configBF609.JPG

              ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////READING ID ZOOMOUT.PNG

              ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////READING ID.PNG

              • 4. Re: S29GL128S90FHI010 with Blackfin BF609
                BacemD_61

                Hello Ahmet,

                 

                Where did you get the base address 0xB0000000 for the static  from? I couldn't find it in the blackfin reference manual.

                The S29GL129S has an initial access time (tACC) of 100ns, so you should take this into account. I see that a CS# low cycle takes 10ns o nthe trace you sent. This will not work here.

                 

                The other thing is that I see two write cycles followed by a read cycle, then 1 write cycle then 1 read cycle. This does not comply with what a call to the function lld_GetDeviceId() is expected to do.

                Normally, we should see 3 write cylces followed by 4 read cycles in toral.

                 

                You're also reading back 0x00559090 which is actually the written values to switch to autoselect mode to read the device IDs, so it looks like the controller is not configured properly.

                Unfortunately, I'm not an expert of Blackfin but I would recommend that you dig deeper into its reference manual to peorperly setup the SMC controller.

                 

                Thanks!

                Best regards,

                Bacem

                ----

                Bacem Daassi

                Cypress Semiconductor Corp.

                Customer Application Engineering

                1 of 1 people found this helpful
                • 5. Re: S29GL128S90FHI010 with Blackfin BF609

                  Hi;

                   

                  we studied the problem in depth as you said. and we found that the SMC controller did not directly control the reset pin. In our previous experiments, the reset was floating.now solve the problem. and we want to share the results.

                   

                         

                  _________________________________________________________________________________________________________

                  Blackfin_conf.PNG

                  Blackfin Config......

                   

                  _______________________________________________________________________________________________________

                  "lld_target_specific.h" config...

                  erere.JPGis it correct for us?

                   

                   

                  ID Read Code:

                  ID_read_codeı.PNG

                  Result : 0x00FF2101

                                                         

                  TEK00001.PNG
                                                          "lld_GetDeviceId" timing...

                   

                   

                   

                  -------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                   

                  we used the code we shared below for reading and writing. seems to have been successful in reading and writing. but the ID seems to be wrong. I share the code and code output.

                   

                                                            Blackfin Memory MAP...

                  Ekran Alıntısı.JPGkod.PNG

                  output.PNG

                  I have a few questions. Is our ID correct? Is our "ldl target specific.h" setting correct?do you have a sample project made with this flash memory with 32 bit microprocessor?

                  • 6. Re: S29GL128S90FHI010 with Blackfin BF609
                    BacemD_61

                    Hello Ahmet,

                     

                    The device ID should be: 007E2101

                    For some reason, the read of the CFI data at word offset 0x1 is not working for you.

                    Could you dump the full CFI data to double check it?

                     

                    Please also a "volatile" descriptor to variables like "base_addr".

                    I guess the offset and the data you wanted to try were in hex, so they should  be 0x10000 and 0x1234 respectively.

                    We don't have sample project for the LLD. And yes, the LLD configuration you have is correct.

                     

                    Thanks!

                     

                    Best regards,

                    Bacem

                    ----

                    Bacem Daassi

                    Cypress Semiconductor Corp.

                    Customer Application Engineering

                    1 of 1 people found this helpful
                    • 7. Re: S29GL128S90FHI010 with Blackfin BF609

                      Hi;

                      Thank you very much for your help. I think we solved the problem. But there is a strange situation.  Situation is that ;We wrote a FOR loop in the file "lld_S29GLxxxS.c".  the system is working correctly. I shared my screen image below.what could be related to this?

                       

                      Get ID.PNG

                      • 8. Re: S29GL128S90FHI010 with Blackfin BF609
                        BacemD_61

                        Hello Ahmet,

                         

                        Glad to hear that you were able to solve the issue.

                        It looks like you have some sort of caching/buffering enabled on the CPU and instruction are not executed immediately.

                        All the instructions should be blocking and should not return until they're executed, otherwise as you've seen here, the Flash may not be in the Autoselect mode yet while you try to read the IDs.

                         

                        Thanks!

                         

                        Best regards,

                        Bacem

                        ----

                        Bacem Daassi

                        Cypress Semiconductor Corp.

                        Customer Application Engineering