Commit 5c809900 authored by iabdalkader's avatar iabdalkader Committed by Damien George

renesas-ra/boards/ARDUINO_PORTENTA_C33: Update WiFi config.

Changes are:
- Enable IRQ on WiFi data ready pin.
- Fix WiFi SPI clock (an exact 30MHz is not possible).
- Update WiFi pins.
Signed-off-by: default avatariabdalkader <i.abdalkader@gmail.com>
parent 279e2561
......@@ -98,9 +98,10 @@ void PORTENTA_C33_board_enter_bootloader(void);
// WiFi config.
#define MICROPY_HW_WIFI_SPI_ID (1)
#define MICROPY_HW_WIFI_SPI_CS (pin_P104)
#define MICROPY_HW_WIFI_SPI_BAUDRATE (30 * 1000 * 1000)
#define MICROPY_HW_WIFI_SPI_BAUDRATE (25 * 1000 * 1000)
#define MICROPY_HW_WIFI_DATAREADY (pin_P803)
#define MICROPY_HW_WIFI_HANDSHAKE (pin_P806)
#define MICROPY_HW_WIFI_IRQ_PIN (MICROPY_HW_WIFI_DATAREADY)
// ESP hosted control pins
#define MICROPY_HW_ESP_HOSTED_RESET (pin_P804)
......
/* generated common source file - do not edit */
#include "common_data.h"
icu_instance_ctrl_t g_external_irq1_ctrl;
const external_irq_cfg_t g_external_irq1_cfg =
{ .channel = 2,
.trigger = EXTERNAL_IRQ_TRIG_RISING,
.filter_enable = false,
.pclk_div = EXTERNAL_IRQ_PCLK_DIV_BY_64,
.p_callback = NULL,
/** If NULL then do not add & */
#if defined(NULL)
.p_context = NULL,
#else
.p_context = &NULL,
#endif
.p_extend = NULL,
.ipl = (12),
#if defined(VECTOR_NUMBER_ICU_IRQ2)
.irq = VECTOR_NUMBER_ICU_IRQ2,
#else
.irq = FSP_INVALID_VECTOR,
#endif
};
/* Instance structure to use this module. */
const external_irq_instance_t g_external_irq1 =
{ .p_ctrl = &g_external_irq1_ctrl, .p_cfg = &g_external_irq1_cfg, .p_api = &g_external_irq_on_icu };
sce_instance_ctrl_t sce_ctrl;
const sce_cfg_t sce_cfg =
{ .lifecycle = SCE_SSD };
......
......@@ -3,12 +3,22 @@
#define COMMON_DATA_H_
#include <stdint.h>
#include "bsp_api.h"
#include "r_sce.h"
#include "r_icu.h"
#include "r_external_irq_api.h"
#include "r_sce.h"
#include "r_ioport.h"
#include "bsp_pin_cfg.h"
FSP_HEADER
/** External IRQ on ICU Instance. */
extern const external_irq_instance_t g_external_irq1;
/** Access the ICU instance using these structures when calling API functions directly (::p_api is not used). */
extern icu_instance_ctrl_t g_external_irq1_ctrl;
extern const external_irq_cfg_t g_external_irq1_cfg;
#ifndef NULL
void NULL(external_irq_callback_args_t *p_args);
#endif
extern sce_instance_ctrl_t sce_ctrl;
extern const sce_cfg_t sce_cfg;
/** External IRQ on ICU Instance. */
......
......@@ -34,6 +34,8 @@ const ioport_pin_cfg_t g_bsp_pin_cfg_data[] =
| (uint32_t)IOPORT_PERIPHERAL_SCI1_3_5_7_9) },
{ .pin = BSP_IO_PORT_06_PIN_07, .pin_cfg = ((uint32_t)IOPORT_CFG_PERIPHERAL_PIN
| (uint32_t)IOPORT_PERIPHERAL_SCI0_2_4_6_8) },
{ .pin = BSP_IO_PORT_08_PIN_03, .pin_cfg = ((uint32_t)IOPORT_CFG_IRQ_ENABLE
| (uint32_t)IOPORT_CFG_PORT_DIRECTION_INPUT) },
{ .pin = BSP_IO_PORT_10_PIN_00, .pin_cfg = ((uint32_t)IOPORT_CFG_PERIPHERAL_PIN
| (uint32_t)IOPORT_PERIPHERAL_SCI0_2_4_6_8) },
};
......
......@@ -33,6 +33,7 @@ BSP_DONT_REMOVE const fsp_vector_t g_vector_table[BSP_ICU_VECTOR_MAX_ENTRIES] BS
[26] = spi_txi_isr, /* SPI1 TXI (Transmit buffer empty) */
[27] = spi_tei_isr, /* SPI1 TEI (Transmission complete event) */
[28] = spi_eri_isr, /* SPI1 ERI (Error) */
[29] = r_icu_isr, /* ICU IRQ2 (External pin interrupt 2) */
};
const bsp_interrupt_event_t g_interrupt_event_link_select[BSP_ICU_VECTOR_MAX_ENTRIES] =
{
......@@ -65,5 +66,6 @@ const bsp_interrupt_event_t g_interrupt_event_link_select[BSP_ICU_VECTOR_MAX_ENT
[26] = BSP_PRV_IELS_ENUM(EVENT_SPI1_TXI), /* SPI1 TXI (Transmit buffer empty) */
[27] = BSP_PRV_IELS_ENUM(EVENT_SPI1_TEI), /* SPI1 TEI (Transmission complete event) */
[28] = BSP_PRV_IELS_ENUM(EVENT_SPI1_ERI), /* SPI1 ERI (Error) */
[29] = BSP_PRV_IELS_ENUM(EVENT_ICU_IRQ2), /* ICU IRQ2 (External pin interrupt 2) */
};
#endif
......@@ -6,7 +6,7 @@ extern "C" {
#endif
/* Number of interrupts allocated */
#ifndef VECTOR_DATA_IRQ_COUNT
#define VECTOR_DATA_IRQ_COUNT (29)
#define VECTOR_DATA_IRQ_COUNT (30)
#endif
/* ISR prototypes */
void sci_uart_rxi_isr(void);
......@@ -92,6 +92,8 @@ void spi_eri_isr(void);
#define SPI1_TEI_IRQn ((IRQn_Type)27) /* SPI1 TEI (Transmission complete event) */
#define VECTOR_NUMBER_SPI1_ERI ((IRQn_Type)28) /* SPI1 ERI (Error) */
#define SPI1_ERI_IRQn ((IRQn_Type)28) /* SPI1 ERI (Error) */
#define VECTOR_NUMBER_ICU_IRQ2 ((IRQn_Type)29) /* ICU IRQ2 (External pin interrupt 2) */
#define ICU_IRQ2_IRQn ((IRQn_Type)29) /* ICU IRQ2 (External pin interrupt 2) */
#ifdef __cplusplus
}
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment