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.

MSPM0L1306: Configuration for DataFlash and PA15 pin

Part Number: MSPM0L1306
Other Parts Discussed in Thread: SYSCONFIG,

Tool/software:

Hi team,

1. They would like to use the flash memory area enclosed in the red frame below as a general DataFlash instead of EEPROM emulation.

Do you have any materials or sample sources for that?

2.Customer use the PA15 pin by dynamically switching between output-H, output-L, and OpenDrain.

When OpenDrain is used, a voltage of about 1V is applied to the pin.

Is there a problem? They think it would be good if the input was disabled with INENA of IOMUX below in OpenDrain settings but they could not confirm it.

Thank you in advance.

Best regards,

Kenley

  • Hi Kenley,

    What does the customer mean by Data Flash vs EEprom emulation?  Do they want to perform write/erase operations during runtime to store data?

    Regarding the IOMUX, yes disabling the pin with INENA is fine when the pin will be open drain.

  • Hi Dennis,

    Thank you for your support.

    Yes, customer want to perform write/erase operations during runtime to store data.

    Regarding the INENA settings, could you tell us how to set using SDK or SYSCFG?

    Best regards,

    Kenley 

  • Hi Kenley,

    You cannot modify the INENA bit of IOMUX register directly in sysconfig.  You will have to do this somewhere in your code using the following function, which is defined in file "DL_Common.h"

    void DL_Common_updateReg()

  • Hi Dennis,


    Thank you for your support.

    Could you guide us on what need to be changed on that function ?

    Best regards,

    Kenley

  • Hi Kenley,

    I believe this will do the trick

    DL_Common_updateReg(&IOMUX->SECCFG.PINCM[IOMUX_PINCM16], 0x00000000, 0x00040000);

  • Hi Dennis,

    Thank you.

    Do you mean customer need to change the code as following ?

    Before: 

    __STATIC_INLINE void DL_Common_updateReg(
    volatile uint32_t *reg, uint32_t val, uint32_t mask)
    {
    uint32_t tmp;

    tmp = *reg;
    tmp = tmp & ~mask;
    *reg = tmp | (val & mask);
    }

    After: 

    __STATIC_INLINE void DL_Common_updateReg(

    &IOMUX->SECCFG.PINCM[IOMUX_PINCM16], 0x00000000, 0x00040000);

    Is it correct?

    Should customer delete the following?

    "{
    uint32_t tmp;

    tmp = *reg;
    tmp = tmp & ~mask;
    *reg = tmp | (val & mask);
    }"

    Thank you,

    Kenley

  • Hi Kenley,

    I apologize for the confusion.  The lines of code you are referring to are the driverlib function lines of code that is called by the application.  Customer does not modify these.  I only presented them to show the "prototype" meaning what function name is and what are the parameters the function expects.

    The customer only needs the following function call with the values shown below in their code.  The first parameter is a pointer to the PINCM16 register, which is the configuration IOMUX for PA15.  The second parameter (bit 18 specifically) is the INENA bit and is set = 0 to disable the IO pin.  The third parameter is the mask for this register and is set = 0x0004000, which indicates which bit in the PINCM16 register is to be modified, which in this case is bit 18 (INENA bit).

    DL_Common_updateReg(&IOMUX->SECCFG.PINCM[IOMUX_PINCM16], 0x00000000, 0x00040000);

  • Hi Dennis,

    I understand now.

    Thank you!

    Best regards,

    Kenley

  • Hi Dennis,

    Regarding the DataFlash, customer want to perform write/erase operations during runtime to store data.

    Do you have any materials or sample sources for that?

    They want to use it by dividing 2Kbyte into two sides with 1Kbyte sector and use it as the front and back side.
    It would be helpful to know how to reserve a region (specify a region).

    Thank you in advance.

    Best regards,

    Kenley

  • Hi Kenley,

    Yes, we do have 2 examples in our M0 SDK.  Customer can find them in the SDK installation directory -> C:\ti\mspm0_sdk_2_02_00_05\examples\nortos\LP_MSPM0L1306\eeprom

  • Hi Dennis,

    Thank you for your support.

    Customer is saying that they do not need the EEPROM emulation but they want to use as usual DataFlash memory as shown on the following diagram on the bottom part.

    In this case, do we have another SDK that can support them?

    Best regards,

    Kenley

  • Hi Kenley,

    Ok, got it.  We actually have some driverlib examples for this.  The example show how to read/write and protect those regions of FLASH for the purpose of data storage.

  • Hi Dennis,

    Thank you.

    Beside that, customer would like to know the following.

    1.How to allocate space for DataFlash

    2. Single time of write/read and sector erase methods.

    If you have a sample that allocates one sector (1kbyte) and performs read/write/erase with specific address, please share the sample code.

    Thank you,

    Kenley

  • Hi Kenley,

    Let me see if I can come up with this info and sample code.

  • Hi Dennis,

    I appreciate it.

    Thank you,

    Kenley

  • Hi Kenley,

    I have not forgotten about you - just need time to put something together.