华大MCU Jflash烧录操作说明IC解密
IC解密#include "main.h"
UART_HandleTypeDef UartHandle;
uint8_t aTxBuffer[12] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
uint8_t aRxBuffer[12] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
void APP_ErrorHandler(void);
void APP_GpioConfig_LED(void);
void APP_USARTConfig(void);
/**
* @brief 应用程序入口函数.
* @retval int
*/
int main(void)
{
/* 初始化所有外设,Flash接口,SysTick */
HAL_Init();
/* 初始化LED */
APP_GpioConfig_LED();
/* 系统时钟配置 */
APP_USARTConfig();
/*通过中断方式接收数据*/
if (HAL_UART_Transmit_IT(&UartHandle, (uint8_t *)aRxBuffer, 12) != HAL_OK)
{
APP_ErrorHandler();
}
while (1)
{
/* 延时250ms */
HAL_Delay(250);
/* LED翻转 */
HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_5);
}
}
/**
* @brief GPIO配置
* @param 无
* @retval 无
*/
static void APP_GpioConfig_LED(void)
{
GPIO_InitTypeDef GPIO_InitStruct;
__HAL_RCC_GPIOA_CLK_ENABLE(); /* 使能GPIOA时钟 */
GPIO_InitStruct.Pin = GPIO_PIN_5;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; /* 推挽输出 */
GPIO_InitStruct.Pull = GPIO_PULLUP; /* 使能上拉 */
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; /* GPIO速度 */
/* GPIO初始化 */
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
}

芯片解密