CodeGen32 – Starter Kit A31G226 Example Code Execution
To make it easier to start ABOV Semiconductor's 32-bit Cortex-M series, we provide CodeGen32 which generates source code and project files, and Starter Kit which has a built-in targeted MCU and Debugger(A-Link) to test the basic functions. In this article, based on the A31G226 Starter Kit which is the ABOV’s 32-bit Cortex-M0+ standard product, we will briefly explain how to create a project through CodeGen32 and to open the project in KEIL MDK ARM to download and run it in the Starter Kit.
First, download CodeGen32 from ABOV’s homepage and decompress and install it. Next, prepare the A31G226 Starter Kit. For compilation and execution, a development environment such as KEIL MDK ARM, IAR EWARM, or Eclipse must be installed, and this article will be described based on the KEIL MDK ARM.
[Figure 1] CodeGen32 Example Test Materials
[Figure 2] CodeGen32 Example Device Selection Window
When you launch ABOV CodeGen32, as shown in [Figure 2] below, you can see the Device Selection window. Select "A31G22x" for "Series Name", "A31G224/226Mx" for "Device Name", and "80-LQFP" for "Package Type". When you press the [Generate Project] button, the entire setting screen will appear.
[Figure 3] Clock Setting
Next, set up for each peripheral in CodeGen32. On the left side of the window, there is Peripherals tab where you can set the device’s clock. As shown in [Figure 3], if you set "MainOSC" and "PLL" to "Enable", "PLL Output" to "48 MHz”, and "Input" of all "MCCRs" except for "WDT" and "WT" to "MCLK", you can see that “AHB CLOCK” and “APB CLOCK” of Clock Configuration will be switched to “48MHz”.
[Figure 4] Package pin Setting
As shown in [Figure 4], you can set the device’s pins in the Package window. Switch "PF0" pin to "XIN", "PF1" pin to "XOUT", "PF2" pin to "SXIN", and "PF3" pin to "SXOUT", respectively.
