4 Replies Latest reply on Jun 17, 2019 7:02 PM by NoriakiT_91

    i have one spi master question


      I have one question about spi master Read access

      I try to read 256 bytes of data from flash

      all data come out of flash correctly

      but spi madule does not read all the data

      here is my code



                         SPIM_Flash_Write(0x06);  //Write Enable




                          SPIM_Flash_Write(0x03);  //Read data byte


                          SPIM_Flash_Write(0x05);  //add 00 Add_Rd_Hi

                          SPIM_Flash_Write(0x01);  //sectR Add_Rd_Lo





                      for(j=0; j<240; j++){  //240

                          SPIM_Flash_Write(0x00);  //to generat read clk


                          // SPIM_Flash_ReadArraybl(dbg_array_flashdata,240);  did not work

                          dbg_array_flashdata[j] = SPIM_Flash_Read();// this only read up to 0x7f it does not read the rest