possible bug in ch549evt

at the moment i am playing with the flash routines for the CH549


It can happen that?FlashProgPage() might return with wrong EA state, My guess is thats not intended.

    ....
    if ( len > (ROM_PAGE_SIZE - page_offset) )
    {
        EA = e_all;        // new restore EA state
        return( 0xFC );    /* 起始地址加上本次写的字节数不能超出当前页, 每64字节为一页, 单次操作不得超出当前页 */
    }
    if ( ( (UINT8)Buf & MASK_ROM_ADDR ) != page_offset )
    {
        EA = e_all;        // new restore EA state
        return( 0xFB );    /* xdata缓冲区地址低6位必须与起始地址低6位相等 */
    }
    ...



I never got any response to this...

I recently redownloaded the ch549evt.zip for some other reason and noticed the different EA handling in the flash routines.

Before EA was always disabled during flash programming. In v1.5 of  FlashRom.c I see flashprogramming without any change of EA.


Does that mean flashprogramming can work with enabled irq? 

What about other devices like ch559?



hello.

Irq and flashprogramming are best not to work at the same time.  More recent routines also have close interrupt operations.  In the Flash_Op_Unlock function.  The CH559 package has also been updated.  It is recommended to refer to the latest demo development



只有登录才能回复,可以选择微信账号登录