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.

MSPM0L1305: BOR 2 Sample Code

Part Number: MSPM0L1305
Other Parts Discussed in Thread: SYSCONFIG

All, 

My assigned focus customer needs some help to write some code before going to UL.

We need some BOR 2 sample code.

CCS 12.7.1

sysconfig 1.20.00.3587

SDK 1.20.00.05

BOR 0 leaves the part in an unknown state in a safety critical product which isn't acceptable but we feel that BOR 2 will work - but it needs some software to activate / service it.

As we understand it Sysconfig just sets the top level of registers but we need to write some underlying code to generage a POR in an interrupt service routine called by a BOR 2 trigger level.

Do we have a code example the engineer could use as 'starter code'.  

 

SYSCFG_DLinit();

    DL_SYSCTL_setBORTheshold(DL_SYSCTL_BOR_THRESOLD_LEVEL_2);

DL_SYSCTL_actvateBORThreshold();

borLevel=DL_SYSCTL_getBORThreshold();  //read active threshold (shows 2 as desired)

void NMI_Handler(void){

// toggle GPIO for the green scope trace

 DL_SYSCTL_resetDevice(DL_SYSCTL_RESET_POR); // executes a POR

}

What else do we need to be doing? 

Do we have to explictly activate the NMI's?  

Do we need to assign any priority to the NMI handler for the BOR?

Best Regards, 

Blake

  • So we ran the customer board with the code above and NMI_Handler does not seem to be getting hit in a BOR 2 event (or ever).  We put a GPIO toggle in the hander and we can't see a toggle on the scope.  Seems we aren't activating the handler correctly.  We are toggling the GPIO on the green line below to show we are petting the watchdog and code is executing.  We are also toggling during the NMI handler before the POR reset code above.  No toggle between the blue lines where we see what should trigger BOR 2.  This says we aren't getting into the BOR routine at all.

    See pic below:

  • Hi Blake,
    Let me consult this with my team, and I'll provide some insight once I get more information if we have any example the customer could use.

    Best Regards,

    Diego Abad

  • Hi Blake,
    Attached is a code reference that the customer can use. The customer should connect the VDD to an external voltage supplier to test this out. BOR_Level_G3507.zip

    Best Regards,

    Diego Abad