This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-AM335X: NAND Flash Writer

Part Number: PROCESSOR-SDK-AM335X
Other Parts Discussed in Thread: AM3358
Dear Sir,
I am using AM3358 processor in our custom board and RTOS SDK 5 on windows host PC. I want to flash the Nand Bootloader code and Application code to Nand Flash (MT29F8G08ABACAH4-IT:C TR). I created a new project for Nand Flash Writer copy all the files available in "C:\ti\pdk_am335x_1_0_16\packages\ti\starterware\tools\flash_writer\src\nand-flash-writer_AM335x" and configured the code as per our board but values in Control Module Pad registers for GPMC AD(0-7), conf_gpmc_wait0 ,etc  are not changing as per our custom board. 
If I change update the Control Module Pad registers for the same pins in available project then it is updating the same registers.
Can you help in this matter?
If any other information required please let me know.
I am working from scratch.
I would be very grateful to you.
Regards,
Gaurav
  • Hi Guarav,

    Gaurav Aggarwal1 said:
    I am using AM3358 processor in our custom board and RTOS SDK 5 on windows host PC

    I don't know what you mean by RTOS SDK 5, but I see PDK 1.0.16 is included in PRSDK 6.1.0.8.

    Gaurav Aggarwal1 said:
    If I change update the Control Module Pad registers for the same pins in available project then it is updating the same registers.

    By this I assume you mean the original flash writer project.

    Gaurav Aggarwal1 said:
    values in Control Module Pad registers for GPMC AD(0-7), conf_gpmc_wait0 ,etc  are not changing as per our custom board

    Inspecting the NAND flash writer code, I see pad configuration occurs in two places:

                main()
                    AM335X_Start()
                        AM335X_DEVICE_init()
                            AM335X_DEVICE_setPad()              // FL: empty function
                               
                    AM335X_NAND_open(GPMC_base_CS_0, AM335X_DEVICE_BUSWIDTH_8BIT)
                            PAD_ConfigMux(PAD_Conf_NANDFlash);  // FL: GPMC pad config applied here
                    
                    nandwriter();
    

    The GPMC pad configuration occurs in the call to PAD_ConfigMux(). Did you modify the PAD configuration values in PAD_Conf_NANDFlash[] for your custom board? I suggest building the flash writer project in debug mode and stepping to this point in the code to see if your pad configuration settings are applied.

    Regards,
    Frank

  • Frank,

    I mean RTOS SDK 5_03_00_07.

    Yes you are right, I am configuring Pad values in PAD_Conf_NANDFlash[] for my custom board. But problem is that it is updating in original project not in created project by me. I copied all the source files from original files to created project and include all the header files.

    Regards,

    Gaurav

  • Hi Guarav,

    Have you tried building your flash writer project in debug mode and running the code to PAD_ConfigMux() to see if your pad configuration settings are applied?

    Regards,
    Frank

  • Frank,

    Yes I tried in Debug mode only but it is not updating pad configuration registers.

    Regards,

    Gaurav

  • Gaurav,

    Are you positive you're building the new project correctly? Have you inspected the values in PAD_Conf_NANDFlash[] which should be written to the PAD configuration registers while stepping through PAD_ConfigMux()?

    Regards,
    Frank

  • Frank,

    This problem is coming with PAD registers only. If I update other registers like GPMC registers, it is updating.

    Regards,

    Gaurav

  • Hi Guarav,

    Please confirm my understanding:

    • You build the unmodified flash writer, and execute it on your custom board to PAD_ConfigMux(PAD_Conf_NANDFlash). In this case, you observe the PAD configuration being updated according to PAD_Conf_NANDFlash[] (see below). You're able to observe the updates to the PAD configuration registers in the CCS window when stepping through the loop in PAD_ConfigMux(). For example, you see an update at address 0x44E1_0800 for conf_gpmc_ad0.
    static pin_muxing_t PAD_Conf_NANDFlash[] = {
    { GPMC_AD0_OFF, MODE(0) | RXACTIVE | PULLUP_EN},
    { GPMC_AD1_OFF, MODE(0) | RXACTIVE | PULLUP_EN},
    { GPMC_AD2_OFF, MODE(0) | RXACTIVE | PULLUP_EN},
    { GPMC_AD3_OFF, MODE(0) | RXACTIVE | PULLUP_EN},
    { GPMC_AD4_OFF, MODE(0) | RXACTIVE | PULLUP_EN},
    { GPMC_AD5_OFF, MODE(0) | RXACTIVE | PULLUP_EN},
    { GPMC_AD6_OFF, MODE(0) | RXACTIVE | PULLUP_EN},
    { GPMC_AD7_OFF, MODE(0) | RXACTIVE | PULLUP_EN},
    { GPMC_WAIT0_OFF, MODE(0) | PULLUP_EN| RXACTIVE},
    { GPMC_WPN_OFF, MODE(0) | RXACTIVE | PULLUP_EN},
    { GPMC_CSN0_OFF, MODE(0) | PULLUPDOWN_DISABLE},
    { GPMC_ADVN_ALE_OFF, MODE(0) | PULLUPDOWN_DISABLE},
    { GPMC_OEN_REN_OFF, MODE(0) | PULLUPDOWN_DISABLE},
    { GPMC_WEN_OFF, MODE(0) | PULLUPDOWN_DISABLE},
    { GPMC_BE0N_CLE_OFF, MODE(0) | PULLUPDOWN_DISABLE},
    { 0xFFFFFFFF },
    • You're able to modify PAD_Conf_NANDFlash[] and rebuild the flash writer. You're able to see that the values written to the pad configuration registers match your updates.
    • When you build your new project (source files are copies of original files, same build method & settings are used), you're able to see the original values for PAD_Conf_NANDFlash[] being written to the pad configuration registers.
    • If you try to modify PAD_Conf_NANDFlash[] in the new project, the values written to the pad configurations don't match your updates, but instead correspond to the original values.


    If all of the above it true, the only thing I can conclude is there is some build problem in your new project.

    • the hardware is the same for old/new projects
    • the source files are identical for old/new projects
    • the build method is the same? the build settings are the same?

    Is your new project somehow picking up object files from the original project?

    Regards,
    Frank

  • Frank,

    Yes your all points are valid. Let me check settings in my new project and will get back to you soon.

    Can you work on https://e2e.ti.com/support/processors/f/791/t/933315. This is the first priority.

    Regards,

    Gaurav

  • Hi Gaurav,

    Sure, I'll treat that thread as the priority.

    Regards,
    Frank