Regarding AT25SF041B SPI FLASH

Hai,

I have an coustomised board with DA14683 MCU and W25Q40EW SPI FLASH. In that board flash is working and my application program is also working.

Now I have a new board with same design containing DA14683 MCU and with NEW flash AT25SF041B. But here SPI is not flashing. I am using smartsnippet IDE.

So SPI is flash is chnaged , so what are all the things i need change in my IDE or Code based on new spi flash. 

I gone through both spi flash data sheets , pin description and opcodes commands maximum all are same. Is there any flash driver i need to add based on New SPI flash.

 And also How MCU copy the program to the SPI FLASH?

Does the MCU contain any default code to Copy code to the SPI Flash? Where can we get that code?

When I flash in new board ie MCU with AT25SF041B SPI Flash, only MCU part name is coming in TERA TERM serial monitor, I put some printf statements too to print helloworld. But only MCU PART number is coming in serial monitor. Why that is? [ MCU with old flash is working]

Please help me for this.  

Thanks

  • Hi there! It sounds like you're working on an interesting project. Let's break down your issues and see how we can resolve them:

    1. SPI Flash Compatibility
    Even though the pin descriptions and opcodes are similar, there might be subtle differences in the behavior or timing requirements of the AT25SF041B compared to the W25Q40EW. It's worth double-checking the datasheets for any specific requirements or quirks.

    2. Driver for New SPI Flash
    You might need to update or add a flash driver specific to the AT25SF041B in your SmartSnippets IDE. Check the documentation for your IDE to see if there's a specific driver or library for this flash chip1. If not, you may need to write or modify the existing driver to accommodate the new flash.

    3. Copying Program to SPI Flash
    The MCU doesn't contain default code to copy programs to the SPI flash. This process is usually handled by a bootloader or custom code that you need to write2. The bootloader is a small program that runs when the MCU powers up and copies the main application from the SPI flash to the MCU's internal memory BOGO Subway Code

    4. Debugging and Serial Monitor Issue
    If only the MCU part number is showing up in the serial monitor, it could indicate that the program isn't being correctly copied to the SPI flash or that there's an issue with the communication setup. Ensure that the bootloader is correctly configured and that the SPI flash is properly initialized.

    Steps to Resolve:
    Check Compatibility: Verify that the AT25SF041B is fully compatible with your MCU and IDE.

    Update/Modify Driver: Ensure you have the correct driver for the AT25SF041B.

    Write Bootloader: If not already done, write a bootloader to copy the program from the SPI flash to the MCU.

    Debugging: Use a logic analyzer or debugger to check the SPI communication and ensure the program is being correctly copied.