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.

MSP432P411V: MSP432P401V

Part Number: MSP432P411V

Hello. I have the same problem and Chris answer is great but ¿How can I tell sysconfig I'm using 401V variant instead of 401R? My project properties has 401V variant and consulting the sysconfig configuration at the project's properties, the variables in ${INHERITED_SYSCONFIG_MANIFESTS} have DEVICE=MSP432P401V, but still the coments at the header of sysconfig scrypt sais MSP432P401R. Thanks in advance.

  • Hi,

    I'm not familiar with MSP432. Is this happen in change from 401R to 401V? Did try to build a new project could solve this problem?

  • Yes, the project is based on the simplelink examples and all of them are build for the 401R variant. I will try building the sysconfig with the stand alone sysconfig builder and if that doesn't work I will have to build the whole project from sckratch if there is no other solution. Thanks.

  • Does build a new project worked? 

  • Not yet solved. The stand alone sysconfig tool, as for the P range, only permits the choice of 2: MSP432P401R or MSP432P4111. So no solution there. So I tried starting the project from scratch, choosing MSP432P401V variant and using the MSP432P401v.cmd file for the linker, but again this did not solve the issue. Not suprised because digging a little farther you can see that in the PowerMSP432.c file, which is the one linked for this purpose, the flash control module, either A or not A, is chosen based on the configurable constant DeviceFamily_ID, and only has 2 choices: either MSP432P4xx or MSP432Px1x1. The MSP432P401V variant falls under the category of MSP432P4xx and therefore is asigned the non A flash controller:

    #if DeviceFamily_ID == DeviceFamily_ID_MSP432P401x
    /* MSP432P401xx devices */
    #include <ti/devices/msp432p4xx/driverlib/flash.h>
    #include <ti/devices/msp432p4xx/driverlib/sysctl.h>
    #define SET_WAIT_STATES MAP_FlashCtl_setWaitState
    #define ENABLE_READ_BUFFERING MAP_FlashCtl_enableReadBuffering
    #define DISABLE_READ_BUFFERING MAP_FlashCtl_disableReadBuffering
    #define GET_NMI_SOURCESTATUS MAP_SysCtl_getNMISourceStatus()
    #define DISABLE_NMI_SOURCE MAP_SysCtl_disableNMISource
    #define ENABLE_NMI_SOURCE MAP_SysCtl_enableNMISource
    #define FLASH_D_READ FLASH_DATA_READ
    #define FLASH_I_FETCH FLASH_INSTRUCTION_FETCH
    #define BANK0 FLASH_BANK0
    #define BANK1 FLASH_BANK1
    #define CSSRC 0x1
    #else
    /* MSP432P4x1xl devices */
    #include <ti/devices/msp432p4xx/driverlib/flash_a.h>
    #include <ti/devices/msp432p4xx/driverlib/sysctl_a.h>
    #define SET_WAIT_STATES MAP_FlashCtl_A_setWaitState
    #define ENABLE_READ_BUFFERING MAP_FlashCtl_A_enableReadBuffering
    #define DISABLE_READ_BUFFERING MAP_FlashCtl_A_disableReadBuffering
    #define GET_NMI_SOURCESTATUS MAP_SysCtl_A_getNMISourceStatus()
    #define DISABLE_NMI_SOURCE MAP_SysCtl_A_disableNMISource
    #define ENABLE_NMI_SOURCE MAP_SysCtl_A_enableNMISource
    #define FLASH_D_READ FLASH_A_DATA_READ
    #define FLASH_I_FETCH FLASH_A_INSTRUCTION_FETCH
    #define BANK0 FLASH_A_BANK0
    #define BANK1 FLASH_A_BANK1
    #define CSSRC 0x1
    #endif

    On the other hand, Chris was right: it is a problem of A or non A flash controller because I have tried to set the flash wait states by hand, before bios_start, with the A flash controller and it works normally; but when tirtos comes into place it reconfigures with the non A flash controller and it's then when the process gets stuck.

    I am in process of digging a bit farther to try to modify PowerMSP432.c to include the V variant in the "if" clause shown above and rebuild the simplelink, but first I have to find out where exactly the DeviceFamily_ID configurable constant is set. I'm pretty new with these devices so this will take me some time.

    Thanks for your interest and best regards.

  • DeviceFamily_ID is defined in DeviceFamily.h, and it is set to value DeviceFamily_ID_MSP432P401x, that is defined in ti_drivers_config.h and .c that are both generated by Syscfg. Ofcourse I do not dare to attempt to modify the Syscfg tool, so this is not the good path. Instead I have temporarily modified DeviceFamily.h:

    #elif defined(DeviceFamily_MSP432P401x) || defined(__MSP432P401R__)
    #define DeviceFamily_ID DeviceFamily_ID_MSP432P4x1xI
    //#define DeviceFamily_ID DeviceFamily_ID_MSP432P401x
    #define DeviceFamily_DIRECTORY msp432p4xx
    #define DeviceFamily_PARENT DeviceFamily_PARENT_MSP432P401R
    #if !defined(__MSP432P401R__)
    #define __MSP432P401R__
    #endif

    And this has meant an advance because now the sentence SET_WAIT_STATES(BANK0, perfNew.flashWaitStates); inside PowerMSP432.c (the one that gets stuck) does point to the flash_A controller instead of the flash (non A) controller; also BANK0 points to FLASH_A_BANK0 instead of FLASH_BANK0. But for my surprise the program still gets stuck here.

    Digging into the assembler code for this sentence because it does not step into it in the C view, you get

    1645 SET_WAIT_STATES(BANK0, perfNew.flashWaitStates);
    00001444: 68A8 ldr r0, [r5, #8]
    00001446: 9C0C ldr r4, [r13, #0x30]
    00001448: 6D40 ldr r0, [r0, #0x54]
    0000144a: 4621 mov r1, r4
    0000144c: 4602 mov r2, r0
    0000144e: 4638 mov r0, r7
    00001450: 4790 blx r2

    And at blx r2, the register r2 solves to address 0x880D58F1; looks good because bit 0 is a 1, but this address is completely out of range if the V variant has 512K program memory. Ofcourse there is nothing here: (blx sets bit 0 to 0, so the destination of the branch is 0x880D58F0):

    880d58f0:   ???? Memory map prevented reading 0x880D58F0 [code=0x20000] 

    ¿Does this give anyone an idea of what can be going wrong?¿Is it necessary to set the 512K program memory range anywhere?

    Thanks and best regards.

  • Thank you very much for these attempts, we could discuss it privately