cancel
Showing results for 
Search instead for 
Did you mean: 

st10f273m can bootstrap

lingo
Associate II
Posted on November 13, 2016 at 23:02

does anyone can share bootstrap loader and monitor to proceed st10f273m CAN bootstrap?

i can successfully enter to BSL over CAN, sending frame 0 with DLC 0 and after 128 frames with id 5 and first byte of my code. It works i can execute my code but the problem is that i cant send anything from st10. Documentation says that BSL routines preparing MO 2 to be TX object with id E6 and DLC 3 and should be send for rquest by sending remote frame...BUT IST NOT!!!!!!
1 REPLY 1
lingo
Associate II
Posted on November 13, 2016 at 23:05

and another thing, below code should make transfer MO2 via CAN....BUT ITS NOT...could abywone tell me what is wrong, please!!!

    DP4 |= 0xC0;

    __asm{nop}

    P4 |= 0xC0;

    __asm{ DISWDT }

      CAN->sMsgObj[CAN_IF1].CMR = CAN_CMR_WRRD

                           | CAN_CMR_MASK

                           | CAN_CMR_ARB

                           | CAN_CMR_CONTROL

                           | CAN_CMR_DATAA

                           | CAN_CMR_DATAB

                            |CAN_CMR_TXRQSTNEWDAT

                            |CAN_CMR_CLRINTPND;

    

  CAN->sMsgObj[CAN_IF1].M1R = 0xFFFF;

  CAN->sMsgObj[CAN_IF1].A1R = 0;

    

    CAN->sMsgObj[CAN_IF1].M2R = CAN_M2R_MDIR | 0x1FFF;

  CAN->sMsgObj[CAN_IF1].A2R = CAN_A2R_MSGVAL | CAN_A2R_DIR | (7<<2);

    CAN->sMsgObj[CAN_IF1].MCR =  CAN_MCR_NEWDAT | 8;

    CAN->sMsgObj[CAN_IF1].DA1R = 0xADDE;

    CAN->sMsgObj[CAN_IF1].CRR = 2;