FAQ

FAQ

How to modify the setting value of external crystal (HXT) for the NuMicro® series chips during programming?  Issue Date:2016-05-17

Taking the Nano100B for example, the clock source supported by each chip is defined in the ”system_Nano100Series.h” file. The default external crystal is 12 MHz. If an external crystal used by a user is changed to 8 MHz, the relative constant definition must be modified accordingly. Please refer to the following modification in bold:

 

Before the modification:

/*-----------------------------------------------------------

  Define SYSCLK

 *---------------------------------------------------------*/

 

#define __HXT         (12000000UL) 

#define __LXT         (32768UL)

#define __HIRC12M     (12000000UL)

#define __LIRC        (10000UL)

#define __HIRC        __HIRC12M

#define __HSI         (__HIRC12M)      /* Factory Default is internal 12MHz */

=============================================================

After the modification:

/*-----------------------------------------------------------

  Define SYSCLK

 *---------------------------------------------------------*/

 

#define __HXT         (8000000UL)

#define __LXT         (32768UL)

#define __HIRC12M     (12000000UL)

#define __LIRC        (10000UL)

#define __HIRC        __HIRC12M

#define __HSI         (__HIRC12M)      /* Factory Default is internal 12MHz */

Products: Microcontrollers ,Arm Cortex-M0 MCUs ,Arm Cortex-M4 MCUs
Applications:
Function: Peripherals,Clock Control,HXT,Software and Tools,Development-Environment,BSP Software Library