/*---------------------------------------------------------------------------------------------------------*/
/* */
/* Copyright(c) 2019 Nuvoton Technology Corp. All rights reserved. */
/* */
/*---------------------------------------------------------------------------------------------------------*/
//***********************************************************************************************************
// Website: http://www.nuvoton.com
// E-Mail : MicroC-8bit@nuvoton.com
//***********************************************************************************************************
#include "ML51.h"
/**
* [url=home.php?mod=space&uid=247401]@brief[/url] IAP modify CONFIG sample, include erase and re-program CONFIG area.
* @param None
* [url=home.php?mod=space&uid=266161]@return[/url] None
* [url=home.php?mod=space&uid=1543424]@Details[/url] Modify CONFIG2 = 0xDF;
*/
void main (void)
{
MFP_P46_GPIO;
P46_INPUT_MODE;
while(P46); //loop here while P13 = 1;
/* include IAP.c in library */
Modify_CONFIG(0xFF,0xFF,0xDF,0xFF,0xFF);
#if 0
MFP_P31_UART0_TXD;
P31_QUASI_MODE;
/* include uart.c in library */
UART_Open(24000000,UART0_Timer3,115200);
ENABLE_UART0_PRINTF;
printf (" CONFIG Modified!");
#endif
while(1);
}
|