File tree 6 files changed +44
-3
lines changed
ports/renesas-ra/boards/ARDUINO_PORTENTA_C33 6 files changed +44
-3
lines changed Original file line number Diff line number Diff line change @@ -98,9 +98,10 @@ void PORTENTA_C33_board_enter_bootloader(void);
98
98
// WiFi config.
99
99
#define MICROPY_HW_WIFI_SPI_ID (1)
100
100
#define MICROPY_HW_WIFI_SPI_CS (pin_P104)
101
- #define MICROPY_HW_WIFI_SPI_BAUDRATE (30 * 1000 * 1000)
101
+ #define MICROPY_HW_WIFI_SPI_BAUDRATE (25 * 1000 * 1000)
102
102
#define MICROPY_HW_WIFI_DATAREADY (pin_P803)
103
103
#define MICROPY_HW_WIFI_HANDSHAKE (pin_P806)
104
+ #define MICROPY_HW_WIFI_IRQ_PIN (MICROPY_HW_WIFI_DATAREADY)
104
105
105
106
// ESP hosted control pins
106
107
#define MICROPY_HW_ESP_HOSTED_RESET (pin_P804)
Original file line number Diff line number Diff line change 1
1
/* generated common source file - do not edit */
2
2
#include "common_data.h"
3
+ icu_instance_ctrl_t g_external_irq1_ctrl ;
4
+ const external_irq_cfg_t g_external_irq1_cfg =
5
+ { .channel = 2 ,
6
+ .trigger = EXTERNAL_IRQ_TRIG_RISING ,
7
+ .filter_enable = false,
8
+ .pclk_div = EXTERNAL_IRQ_PCLK_DIV_BY_64 ,
9
+ .p_callback = NULL ,
10
+ /** If NULL then do not add & */
11
+ #if defined(NULL )
12
+ .p_context = NULL ,
13
+ #else
14
+ .p_context = & NULL ,
15
+ #endif
16
+ .p_extend = NULL ,
17
+ .ipl = (12 ),
18
+ #if defined(VECTOR_NUMBER_ICU_IRQ2 )
19
+ .irq = VECTOR_NUMBER_ICU_IRQ2 ,
20
+ #else
21
+ .irq = FSP_INVALID_VECTOR ,
22
+ #endif
23
+ };
24
+ /* Instance structure to use this module. */
25
+ const external_irq_instance_t g_external_irq1 =
26
+ { .p_ctrl = & g_external_irq1_ctrl , .p_cfg = & g_external_irq1_cfg , .p_api = & g_external_irq_on_icu };
3
27
sce_instance_ctrl_t sce_ctrl ;
4
28
const sce_cfg_t sce_cfg =
5
29
{ .lifecycle = SCE_SSD };
Original file line number Diff line number Diff line change 3
3
#define COMMON_DATA_H_
4
4
#include <stdint.h>
5
5
#include "bsp_api.h"
6
- #include "r_sce.h"
7
6
#include "r_icu.h"
8
7
#include "r_external_irq_api.h"
8
+ #include "r_sce.h"
9
9
#include "r_ioport.h"
10
10
#include "bsp_pin_cfg.h"
11
11
FSP_HEADER
12
+ /** External IRQ on ICU Instance. */
13
+ extern const external_irq_instance_t g_external_irq1 ;
14
+
15
+ /** Access the ICU instance using these structures when calling API functions directly (::p_api is not used). */
16
+ extern icu_instance_ctrl_t g_external_irq1_ctrl ;
17
+ extern const external_irq_cfg_t g_external_irq1_cfg ;
18
+
19
+ #ifndef NULL
20
+ void NULL (external_irq_callback_args_t * p_args );
21
+ #endif
12
22
extern sce_instance_ctrl_t sce_ctrl ;
13
23
extern const sce_cfg_t sce_cfg ;
14
24
/** External IRQ on ICU Instance. */
Original file line number Diff line number Diff line change @@ -34,6 +34,8 @@ const ioport_pin_cfg_t g_bsp_pin_cfg_data[] =
34
34
| (uint32_t )IOPORT_PERIPHERAL_SCI1_3_5_7_9 ) },
35
35
{ .pin = BSP_IO_PORT_06_PIN_07 , .pin_cfg = ((uint32_t )IOPORT_CFG_PERIPHERAL_PIN
36
36
| (uint32_t )IOPORT_PERIPHERAL_SCI0_2_4_6_8 ) },
37
+ { .pin = BSP_IO_PORT_08_PIN_03 , .pin_cfg = ((uint32_t )IOPORT_CFG_IRQ_ENABLE
38
+ | (uint32_t )IOPORT_CFG_PORT_DIRECTION_INPUT ) },
37
39
{ .pin = BSP_IO_PORT_10_PIN_00 , .pin_cfg = ((uint32_t )IOPORT_CFG_PERIPHERAL_PIN
38
40
| (uint32_t )IOPORT_PERIPHERAL_SCI0_2_4_6_8 ) },
39
41
};
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ BSP_DONT_REMOVE const fsp_vector_t g_vector_table[BSP_ICU_VECTOR_MAX_ENTRIES] BS
33
33
[26 ] = spi_txi_isr , /* SPI1 TXI (Transmit buffer empty) */
34
34
[27 ] = spi_tei_isr , /* SPI1 TEI (Transmission complete event) */
35
35
[28 ] = spi_eri_isr , /* SPI1 ERI (Error) */
36
+ [29 ] = r_icu_isr , /* ICU IRQ2 (External pin interrupt 2) */
36
37
};
37
38
const bsp_interrupt_event_t g_interrupt_event_link_select [BSP_ICU_VECTOR_MAX_ENTRIES ] =
38
39
{
@@ -65,5 +66,6 @@ const bsp_interrupt_event_t g_interrupt_event_link_select[BSP_ICU_VECTOR_MAX_ENT
65
66
[26 ] = BSP_PRV_IELS_ENUM (EVENT_SPI1_TXI ), /* SPI1 TXI (Transmit buffer empty) */
66
67
[27 ] = BSP_PRV_IELS_ENUM (EVENT_SPI1_TEI ), /* SPI1 TEI (Transmission complete event) */
67
68
[28 ] = BSP_PRV_IELS_ENUM (EVENT_SPI1_ERI ), /* SPI1 ERI (Error) */
69
+ [29 ] = BSP_PRV_IELS_ENUM (EVENT_ICU_IRQ2 ), /* ICU IRQ2 (External pin interrupt 2) */
68
70
};
69
71
#endif
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ extern "C" {
6
6
#endif
7
7
/* Number of interrupts allocated */
8
8
#ifndef VECTOR_DATA_IRQ_COUNT
9
- #define VECTOR_DATA_IRQ_COUNT (29 )
9
+ #define VECTOR_DATA_IRQ_COUNT (30 )
10
10
#endif
11
11
/* ISR prototypes */
12
12
void sci_uart_rxi_isr (void );
@@ -92,6 +92,8 @@ void spi_eri_isr(void);
92
92
#define SPI1_TEI_IRQn ((IRQn_Type)27) /* SPI1 TEI (Transmission complete event) */
93
93
#define VECTOR_NUMBER_SPI1_ERI ((IRQn_Type)28) /* SPI1 ERI (Error) */
94
94
#define SPI1_ERI_IRQn ((IRQn_Type)28) /* SPI1 ERI (Error) */
95
+ #define VECTOR_NUMBER_ICU_IRQ2 ((IRQn_Type)29) /* ICU IRQ2 (External pin interrupt 2) */
96
+ #define ICU_IRQ2_IRQn ((IRQn_Type)29) /* ICU IRQ2 (External pin interrupt 2) */
95
97
#ifdef __cplusplus
96
98
}
97
99
#endif
You can’t perform that action at this time.
0 commit comments