【瑞萨RA6E1】 +LED点灯
1  GPIO配置

屏幕截图 2023-12-15 133554.png
默认打开了SCL 要将他Disabled

屏幕截图 2023-12-15 133723.png
GPIO配置

2  实验代码  

  • /*******************************************************************************************************************//**
  • * main() is generated by the RA Configuration editor and is used to generate threads if an RTOS is used.  This function
  • * is called by main() when no RTOS is used.
  • **********************************************************************************************************************/
  • void hal_entry(void)
  • {
  •     /* TODO: add your own code here */
  •           R_IOPORT_Open (&g_ioport_ctrl, g_ioport.p_cfg);
  •           
  •           while(1)
  •                 {
  •                         R_IOPORT_PinWrite(&g_ioport_ctrl, BSP_IO_PORT_01_PIN_00, BSP_IO_LEVEL_LOW);
  •                         R_BSP_SoftwareDelay(1, BSP_DELAY_UNITS_SECONDS);
  •                         R_IOPORT_PinWrite(&g_ioport_ctrl, BSP_IO_PORT_01_PIN_02, BSP_IO_LEVEL_HIGH);
  •                         R_BSP_SoftwareDelay(1, BSP_DELAY_UNITS_SECONDS);

  •                         R_IOPORT_PinWrite(&g_ioport_ctrl, BSP_IO_PORT_01_PIN_00, BSP_IO_LEVEL_HIGH);
  •                         R_BSP_SoftwareDelay(1, BSP_DELAY_UNITS_SECONDS);
  •                         R_IOPORT_PinWrite(&g_ioport_ctrl, BSP_IO_PORT_01_PIN_02, BSP_IO_LEVEL_LOW);
  •                         R_BSP_SoftwareDelay(1, BSP_DELAY_UNITS_SECONDS);
  •                   
  •                 }

  • #if BSP_TZ_SECURE_BUILD
  •     /* Enter non-secure code */
  •     R_BSP_NonSecureEnter();
  • #endif
  • }


  • 复制代码


                                     朋友们   g_ioport_ctrl是个啥东西干啥用的




    3实验现象


    d2955f73cc9651db105891a5fc9f3f8.jpg








  • 复制代码