|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Board-support implementation for the RA8P1 foundation board. More...
#include "ra8_board_ra8p1.h"#include <stddef.h>#include <stdint.h>#include "ra8_cgc.h"#include "ra8_elc_regs.h"#include "ra8_err.h"#include "ra8_gpio_constants.h"#include "ra8_icu.h"#include "ra8_icu_regs.h"#include "ra8_isr.h"#include "ra8_port_constants.h"#include "ra8_port_utils.h"#include "ra8_sci.h"Go to the source code of this file.
Enumerations | |
| enum | ra8_board_uart_console_clock_t : uint32_t { k_ra8_board_uart_console_min_pclka_hz = 16000000UL } |
| Minimum SCI module operating clock accepted by the console init. More... | |
Functions | |
| ra8_err_t | ra8_board_get_info (ra8_board_info_t *out) |
| Copy the three board-identity strings into out. | |
| ra8_err_t | ra8_board_led_pin (ra8_board_led_id_t led, ra8_port_pin_t *out_pin) |
| Translate a board LED id into its underlying ra8_port_pin_t. | |
| ra8_err_t | ra8_board_led_init (ra8_board_led_id_t led) |
| Configure led as a digital output, initial level low (off). | |
| ra8_err_t | ra8_board_led_on (ra8_board_led_id_t led) |
| Drive led HIGH (light it). | |
| ra8_err_t | ra8_board_led_off (ra8_board_led_id_t led) |
| Drive led LOW (extinguish it). | |
| ra8_err_t | ra8_board_led_toggle (ra8_board_led_id_t led) |
| Toggle led's output state. | |
| ra8_err_t | ra8_board_sw_pin (ra8_board_sw_id_t sw, ra8_port_pin_t *out_pin) |
| Translate a board switch id into its underlying ra8_port_pin_t. | |
| ra8_err_t | ra8_board_sw_init (ra8_board_sw_id_t sw) |
| Configure a switch pin as an input with internal pull-up. | |
| ra8_err_t | ra8_board_sw_read (ra8_board_sw_id_t sw, ra8_board_sw_state_t *out_pressed) |
| Sample the current state of sw. | |
| ra8_err_t | ra8_board_sw_attach_irq (ra8_board_sw_id_t sw, ra8_board_sw_irq_cb_t cb, void *ctx) |
| Wire sw to the ICU and register a falling-edge callback. | |
| ra8_err_t | ra8_board_uart_console_init (uint32_t baud) |
| Configure SCI8 + PD02/PD03 as the debug-console UART. | |
| ra8_err_t | ra8_board_uart_console_write (const uint8_t *data, size_t len) |
| Polled blocking write to the J-Link OB VCOM console. | |
| ra8_err_t | ra8_board_uart_console_read (uint8_t *out, size_t cap, size_t *out_len) |
| Polled non-blocking read from the J-Link OB VCOM console. | |
| ra8_err_t | ra8_board_uart_console_flush (void) |
| Block until every byte queued on the J-Link OB VCOM console has finished clocking out on the wire. | |
Variables | |
| const char *const | k_ra8_board_name = "RA8P1 foundation board" |
| Human-readable strings identifying this BSP target. | |
| const char *const | k_ra8_board_doc_rev = "R01UH1064EJ (chip HUM)" |
| "R20UT5523EG0101 Rev 1.01". | |
| const char *const | k_ra8_board_mcu = "R7KA8P1KFLCAC" |
| "R7KA8D2KFLCAC". | |
| static const ra8_port_pin_t | s_led_pins [k_ra8_board_led_count] |
| Lookup table from ra8_board_led_id_t to ra8_port_pin_t. | |
| static const ra8_port_pin_t | s_sw_pins [k_ra8_board_sw_count] |
| Lookup table from ra8_board_sw_id_t to ra8_port_pin_t. | |
| static const uint8_t | s_sw_irq_nums [k_ra8_board_sw_count] |
| Lookup table from ra8_board_sw_id_t to ICU IRQ channel. | |
| static bool | s_uart_console_initialized = false |
| Tracks whether ra8_board_uart_console_init has succeeded. | |
Board-support implementation for the RA8P1 foundation board.
Translates board-coordinate APIs ("LED1", "SW1", "the console") into HAL calls for the RA8P1 (R7KA8P1KFLCAC). The BSP itself never touches MCU registers; ra8_gpio_* / ra8_pfs_route_peripheral / ra8_icu_configure_irq_pin / ra8_sci_* carry every register write, and each of those HAL entry points carries its own RA8P1-identical HUM citation.
The pin tables below are PROVISIONAL, mirrored from the pin-compatible EK-RA8D2 layout because no RA8P1 board is defined yet (no committed EK-RA8P1 User's Manual, no ra8p1_kicad/ PCB). See the header for the full TODO(EK-RA8P1 UM / ra8p1_kicad) rationale; every pin is a valid GPIO / SCI alternate on the RA8P1 (chip HUM R01UH1064EJ Ch 20 "I/O Ports").
Definition in file ra8_board_ra8p1.c.
| enum ra8_board_uart_console_clock_t : uint32_t |
Minimum SCI module operating clock accepted by the console init.
The RA8P1 SCI_B baud-rate generator is clocked from PCLKA (byte-identical to the RA8D2, chip HUM R01UH1064EJ Ch 38 "Serial Communications Interface"). Before ra8_cgc_init() brings the PLL up the chip sits on MOCO (~8 MHz), far too low for a usable 115200 baud divisor, so the console init refuses to come up until CGC has published a post-PLL PCLKA value. This floor sits well above MOCO and below the target so any reasonable CGC tree still qualifies.
| Enumerator | |
|---|---|
| k_ra8_board_uart_console_min_pclka_hz | 16 MHz PCLKA floor. |
Definition at line 267 of file ra8_board_ra8p1.c.
|
nodiscard |
Copy the three board-identity strings into out.
| [out] | out | Destination struct, must be non-NULL. |
| k_ra8_ok | Filled. |
| k_ra8_err_invalid_arg | out == NULL. |
Definition at line 51 of file ra8_board_ra8p1.c.
References ra8_board_info_t::doc_rev, k_ra8_board_doc_rev, k_ra8_board_mcu, k_ra8_board_name, k_ra8_err_invalid_arg, k_ra8_ok, ra8_board_info_t::mcu, and ra8_board_info_t::name.
|
nodiscard |
Configure led as a digital output, initial level low (off).
| k_ra8_ok | Pin claimed and driven low. |
| k_ra8_err_invalid_arg | led >= k_ra8_board_led_count. |
| k_ra8_err_gpio_conflict | Pin already owned. |
Definition at line 96 of file ra8_board_ra8p1.c.
References k_ra8_level_low, k_ra8_ok, k_ra8_pin_none, pin, ra8_board_led_pin(), and ra8_gpio_output_init().
Referenced by adc_diag_setup_or_halt(), app_bringup_clocks(), blc_setup_or_halt(), c6_probe_setup_or_halt(), cdc_setup_or_halt(), cm_bringup_clocks(), combo_setup_or_halt(), crc_demo_setup_or_halt(), demo_setup_or_halt(), demo_setup_or_halt(), dfu_setup_or_halt(), drw_blend_setup_or_halt(), drw_demo_setup_or_halt(), dtc_arm_setup_or_halt(), dtc_coh_setup_or_halt(), dtc_demo_setup_or_halt(), ep_bringup_core(), ez_bringup_clocks(), fileops_setup_or_halt(), flash_journal_setup_or_halt(), gpt_ecc_clocks_or_halt(), gptp_setup_or_halt(), hid_setup_or_halt(), i3c_demo_setup_or_halt(), iic_setup_or_halt(), imu_demo_setup_or_halt(), internal_acmphs_demo_setup(), internal_agt_periodic_setup_or_halt(), internal_audio_loopback_init_clocks_and_led(), internal_bkup_demo_setup_or_halt(), internal_blink_pins_init(), internal_can_demo_setup_or_halt(), internal_canfd_demo_setup_or_halt(), internal_canfd_filter_setup_or_halt(), internal_clock_check_pins_init(), internal_dac_b_demo_setup_or_halt(), internal_demo_clocks_or_halt(), internal_dotf_demo_setup_or_halt(), internal_gpio_demo_setup_or_halt(), internal_gpt_3p_demo_setup_or_halt(), internal_gpt_irq_demo_setup_or_halt(), internal_gpt_pwm_demo_setup_or_halt(), internal_icu_extint_demo_setup_or_halt(), internal_iic_peripheral_setup_or_halt(), internal_kat_setup_or_halt(), internal_lcd_bringup_clocks(), internal_lpm_deep_setup_or_halt(), internal_lpm_demo_setup_or_halt(), internal_lpm_wake_setup_or_halt(), internal_lvd_demo_setup_or_halt(), internal_mecc_setup_or_halt(), internal_motor_3phase_init_clocks_and_led(), internal_mpu_simple_setup_or_halt(), internal_pdg_demo_setup_or_halt(), internal_poeg_demo_setup_or_halt(), internal_rng_demo_setup_or_halt(), internal_setup_or_halt(), internal_uart_hello_setup_or_halt(), internal_usb_audio_clocks_or_halt(), internal_wdt_demo_setup_or_halt(), kat_setup_or_halt(), l3_setup_or_halt(), lcd_bringup_clocks(), lin_hil_setup_or_halt(), lpi_setup_or_halt(), main(), mg_bringup_clocks(), microsd_setup_or_halt(), mlun_setup_or_halt(), modem_setup_or_halt(), ospirw_setup_or_halt(), pdm_demo_io_or_halt(), pp_demo_modules_or_halt(), riic_target_setup_or_halt(), rot_setup_or_halt(), sb_setup_or_halt(), scb_demo_setup_or_halt(), sdmsc_setup_or_halt(), sdram_demo_setup_or_halt(), selftest_setup_or_halt(), sfr_bringup_clocks(), timer_demo_setup_or_halt(), tsn_setup_or_halt(), uart_irq_setup_or_halt(), wdt_rr_setup_or_halt(), wdt_window_demo_setup_or_halt(), and wlun_setup_or_halt().
|
nodiscard |
Drive led LOW (extinguish it).
| k_ra8_ok | / k_ra8_err_invalid_arg |
Definition at line 116 of file ra8_board_ra8p1.c.
References k_ra8_level_low, k_ra8_ok, k_ra8_pin_none, pin, ra8_board_led_pin(), and ra8_gpio_write().
Referenced by internal_gpio_demo_one_iter().
|
nodiscard |
Drive led HIGH (light it).
| k_ra8_ok | / k_ra8_err_invalid_arg |
Definition at line 106 of file ra8_board_ra8p1.c.
References k_ra8_level_high, k_ra8_ok, k_ra8_pin_none, pin, ra8_board_led_pin(), and ra8_gpio_write().
Referenced by app_panic_halt(), c6_probe_run(), cdc_host_pass(), cm_panic_halt(), dfu_host_pass(), dfu_host_pass(), ep_panic_halt(), ez_panic_halt(), fileops_run_ladder(), hid_host_pass(), hid_host_pass(), imu_demo_check_who_am_i(), imu_demo_configure(), imu_demo_sample_and_emit(), internal_gpio_demo_one_iter(), internal_lcd_panic_halt(), lcd_panic_halt(), main(), mg_panic_halt(), microsd_host_pass(), mlun_host_pass(), modem_fail(), ospirw_host_pass(), selftest_host_pass(), selftest_host_pass(), sfr_panic_halt(), sfr_render_or_halt(), and wlun_host_pass().
|
nodiscard |
Translate a board LED id into its underlying ra8_port_pin_t.
| [in] | led | LED identifier. |
| [out] | out_pin | Destination pin id. |
| k_ra8_ok | / k_ra8_err_invalid_arg |
Definition at line 84 of file ra8_board_ra8p1.c.
References k_ra8_board_led_count, k_ra8_err_invalid_arg, k_ra8_ok, and s_led_pins.
Referenced by ra8_board_led_init(), ra8_board_led_off(), ra8_board_led_on(), and ra8_board_led_toggle().
|
nodiscard |
Toggle led's output state.
| k_ra8_ok | / k_ra8_err_invalid_arg |
Definition at line 126 of file ra8_board_ra8p1.c.
References k_ra8_ok, k_ra8_pin_none, pin, ra8_board_led_pin(), and ra8_gpio_toggle().
Referenced by cdc_echo_iter(), demo_echo_iter(), demo_jiggle_send(), demo_msc_read(), demo_msc_write(), demo_report(), demo_worker_echo_loop(), dtc_coh_report(), fileops_suite_create(), fileops_suite_mutate(), gpt_ecc_service_capture(), hid_send_iter(), hid_send_iter(), internal_acmphs_demo_one_iter(), internal_blink_pins_toggle_all(), internal_clock_check_pins_toggle_all(), internal_demo_tick_battery(), internal_gpt_irq_demo_isr(), internal_iic_peripheral_service(), internal_on_complete(), internal_report(), internal_retune_thread_entry(), internal_sdcard_thread_entry(), internal_thread_a_entry(), internal_thread_b_entry(), internal_thread_entry(), internal_thread_rx_entry(), internal_thread_tx_entry(), internal_usb_audio_log_frames(), lpi_do_work(), main(), microsd_msc_read(), mlun_msc_read(), ospirw_msc_read(), ospirw_msc_write(), riic_target_on_event(), sdmsc_msc_read(), sdmsc_msc_write(), selftest_msc_read(), selftest_msc_read(), timer_demo_one_capture(), uart_irq_rx_cb(), wdt_rr_arm_and_wait_for_reset(), wdt_window_demo_iter(), wlun_msc_read(), and wlun_msc_write().
|
nodiscard |
Wire sw to the ICU and register a falling-edge callback.
Buttons are active-low so a falling edge corresponds to a press. The HAL takes care of the PFS routing, IRQCR programming, and NVIC enable; this veneer just hides the specific channel number (UM Table 25) from the caller.
| k_ra8_ok | / k_ra8_err_invalid_arg / k_ra8_err_gpio_conflict |
Definition at line 204 of file ra8_board_ra8p1.c.
References k_ra8_board_sw1, k_ra8_board_sw_count, k_ra8_elc_event_icu_irq12, k_ra8_elc_event_icu_irq13, k_ra8_err_invalid_arg, k_ra8_icu_fclksel_pclkb, k_ra8_icu_irqmd_falling, k_ra8_isr_prio_default, k_ra8_ok, ra8_icu_configure_irq_pin(), ra8_isr_register(), and s_sw_irq_nums.
|
nodiscard |
Configure a switch pin as an input with internal pull-up.
| k_ra8_ok | / k_ra8_err_invalid_arg / k_ra8_err_gpio_conflict |
Definition at line 173 of file ra8_board_ra8p1.c.
References k_ra8_ok, k_ra8_pin_none, k_ra8_pull_up, pin, ra8_board_sw_pin(), and ra8_gpio_input_init().
Referenced by internal_gpio_demo_setup_or_halt(), internal_icu_extint_demo_setup_or_halt(), internal_kint_demo_arm(), internal_setup_or_halt(), main(), sh_input_init(), and wd_setup_or_halt().
|
nodiscard |
Translate a board switch id into its underlying ra8_port_pin_t.
Definition at line 161 of file ra8_board_ra8p1.c.
References k_ra8_board_sw_count, k_ra8_err_invalid_arg, k_ra8_ok, and s_sw_pins.
Referenced by er_poll_buttons(), ra8_board_sw_init(), ra8_board_sw_read(), and wd_setup_or_halt().
|
nodiscard |
Sample the current state of sw.
The buttons are wired active-low (press shorts the pin to GND); this function inverts the level so callers receive a positive "pressed = true" semantic.
| [in] | sw | Switch id. |
| [out] | out_pressed | Set to k_ra8_board_sw_pressed if held. |
| k_ra8_ok | Read complete. |
| k_ra8_err_invalid_arg | sw out of range or out_pressed NULL. |
Definition at line 183 of file ra8_board_ra8p1.c.
References k_ra8_board_sw_pressed, k_ra8_board_sw_released, k_ra8_err_invalid_arg, k_ra8_level_high, k_ra8_level_low, k_ra8_ok, k_ra8_pin_none, pin, ra8_board_sw_pin(), and ra8_gpio_read().
Referenced by internal_edge(), internal_gpio_demo_one_iter(), ls_poll_buttons(), main(), sh_pump_input(), and sh_run().
|
nodiscard |
Block until every byte queued on the J-Link OB VCOM console has finished clocking out on the wire.
Block until every byte queued on the console has clocked out.
Thin wrapper around ra8_sci_flush(k_ra8_board_uart_console_sci_channel) that polls CSR.TEND on the SCI8 channel that backs the J-Link OB VCOM bridge (HUM Ch 38.2.17 "CSR : Common Status Register", p 2225). The intended caller is a panic-handler that needs the failure log to reach the host before WFI gates the SCI clock and silently drops the remaining FIFO contents.
| k_ra8_ok | TEND observed (or fake stub). |
| k_ra8_err_not_initialized | ra8_board_uart_console_init not called. |
| k_ra8_err_hw_timeout | Spin budget elapsed without TEND. |
Definition at line 366 of file ra8_board_ra8p1.c.
References k_ra8_board_uart_console_sci_channel, k_ra8_err_not_initialized, ra8_sci_flush(), and s_uart_console_initialized.
Referenced by app_launch_hil_emit_pass(), app_shell_hil_emit_pass(), cache_hal_emit(), cache_mpu_emit(), demo_panic_halt(), dtc_coh_report(), dualcore_bg_hil_emit_pass(), dualcore_mailbox_hil_emit_pass(), imp_panic(), internal_emit_pass(), internal_npu_infer_emit(), internal_npu_smoke_emit(), internal_npu_vela_emit(), internal_rcs_panic_halt(), internal_report(), main(), and mpu_boot_emit().
|
nodiscard |
Configure SCI8 + PD02/PD03 as the debug-console UART.
Routes PD02 -> TXD8 and PD03 -> RXD8 (PSEL = SCI async) and brings SCI8 up via ra8_sci_init with 8N1 framing at the requested baud. The SCI module operating clock on RA8D2 is PCLKA (chip HUM Ch 38.2 "SCI registers"); the BRR divisor is computed from the current PCLKA frequency reported by ra8_cgc_get_clock_hz, so callers must call ra8_cgc_init() before ra8_board_uart_console_init. Applications that retune CGC afterwards must additionally call ra8_sci_set_baud((uint8_t)k_ra8_board_uart_console_sci_channel, baud, new_pclka_hz) to recompute the divisor.
| [in] | baud | Target line rate in bps (e.g. 115200). |
| k_ra8_ok | Console up, ready to TX/RX. |
| k_ra8_err_invalid_arg | baud == 0. |
| k_ra8_err_not_initialized | ra8_cgc_init has not yet published a usable PCLKA value (chip still on MOCO / pre-PLL). |
| k_ra8_err_gpio_conflict | PD02 or PD03 already owned. |
| k_ra8_err_hw_init_failed | Underlying ra8_sci_init failed. |
Definition at line 271 of file ra8_board_ra8p1.c.
References k_ra8_board_uart_console_min_pclka_hz, k_ra8_board_uart_console_pin_rxd, k_ra8_board_uart_console_pin_txd, k_ra8_board_uart_console_sci_channel, k_ra8_clock_id_pclka, k_ra8_err_invalid_arg, k_ra8_err_not_initialized, k_ra8_ok, k_ra8_psel_sci_async, k_ra8_sci_data_8, k_ra8_sci_parity_none, k_ra8_sci_stop_1, ra8_cgc_get_clock_hz(), ra8_pfs_route_peripheral(), ra8_sci_init(), and s_uart_console_initialized.
Referenced by adc_diag_setup_or_halt(), al_setup_or_halt(), app_bringup_clocks(), app_launch_hil_console_init(), app_setup(), app_shell_hil_console_init(), bm_setup_or_halt(), bs_setup_or_halt(), c6_fwver_setup_or_halt(), c6_hosted_setup_or_halt(), c6_join_setup_or_halt(), c6_probe_setup_or_halt(), c6_wifi_setup_or_halt(), cache_hal_setup(), cache_mpu_setup(), cam_bringup(), cdc_setup_or_halt(), ch_setup_or_halt(), cm_bringup_clocks(), combo_setup_or_halt(), crc_demo_setup_or_halt(), demo_setup_or_halt(), demo_setup_or_halt(), dfu_setup_or_halt(), drw_blend_setup_or_halt(), drw_demo_setup_or_halt(), dtc_arm_setup_or_halt(), dtc_coh_setup_or_halt(), dtc_demo_setup_or_halt(), dualcore_bg_hil_console_init(), dualcore_mailbox_hil_console_init(), ec_setup_or_halt(), ef_setup_or_halt(), ehb_setup_or_halt(), eoh_setup_or_halt(), eop_setup_or_halt(), ep_bringup_core(), ep_setup_or_halt(), erb_setup_or_halt(), es_setup_or_halt(), est_setup_or_halt(), etoc_setup_or_halt(), ez_bringup_clocks(), fc_setup_or_halt(), fileops_setup_or_halt(), fs_fmt_setup_or_halt(), gh_setup_or_halt(), gptp_setup_or_halt(), hid_setup_or_halt(), i3c_demo_setup_or_halt(), iic_setup_or_halt(), imp_setup_or_halt(), imu_demo_setup_or_halt(), internal_agt_periodic_setup_or_halt(), internal_audio_loopback_init_console(), internal_bkup_demo_setup_or_halt(), internal_c6_cam_setup_or_halt(), internal_console_init(), internal_demo_clocks_or_halt(), internal_demo_setup_or_halt(), internal_dotf_demo_setup_or_halt(), internal_eth_loopback_setup_or_halt(), internal_icu_extint_demo_setup_or_halt(), internal_kat_setup_or_halt(), internal_kint_demo_setup_or_halt(), internal_lpm_deep_setup_or_halt(), internal_lpm_demo_setup_or_halt(), internal_lpm_dpsby1_setup_or_halt(), internal_lpm_dpsby2_setup_or_halt(), internal_lpm_dpsby3_setup_or_halt(), internal_lpm_swstd_setup_or_halt(), internal_lpm_wake_setup_or_halt(), internal_lus_setup_or_halt(), internal_lvd_demo_setup_or_halt(), internal_mecc_setup_or_halt(), internal_motor_3phase_init_console(), internal_mpu_simple_setup_or_halt(), internal_npu_infer_setup_or_halt(), internal_npu_smoke_setup_or_halt(), internal_npu_vela_setup_or_halt(), internal_pc_setup_or_halt(), internal_pdg_demo_setup_or_halt(), internal_poeg_demo_setup_or_halt(), internal_rc_setup_or_halt(), internal_rcs_setup_or_halt(), internal_rng_demo_setup_or_halt(), internal_rtc_demo_setup_or_halt(), internal_sd_demo_setup_or_halt(), internal_setup_or_halt(), internal_ssie_loop_setup_or_halt(), internal_tc_setup_or_halt(), internal_td_setup_or_halt(), internal_uart_hello_setup_or_halt(), internal_usb_audio_setup_or_halt(), internal_wdt_demo_setup_or_halt(), ipc_demo_setup_or_halt(), iu_setup_or_halt(), iv_setup_or_halt(), kat_setup_or_halt(), kb_setup_or_halt(), l3_setup_or_halt(), lin_hil_setup_or_halt(), lk_setup_or_halt(), lpi_setup_or_halt(), main(), mem_setup_or_halt(), mg_bringup_clocks(), microsd_setup_or_halt(), mlun_setup_or_halt(), modem_setup_or_halt(), mpu_boot_setup(), ospirw_setup_or_halt(), pdm_demo_io_or_halt(), pp_demo_clocks_or_halt(), ra8_nsc_periph_init(), riic_target_setup_or_halt(), rot_setup_or_halt(), sb_setup_or_halt(), sbns_console_bringup(), scb_demo_setup_or_halt(), sd_demo_setup_or_halt(), sd_setup_or_halt(), sdhi_card_setup_or_halt(), sdhi_demo_setup_or_halt(), sdmsc_setup_or_halt(), sdram_demo_setup_or_halt(), selftest_setup_or_halt(), sh_setup_or_halt(), tb_setup_or_halt(), timer_demo_setup_or_halt(), tsn_setup_or_halt(), wa_setup_or_halt(), wc_setup_or_halt(), wd_setup_or_halt(), wdt_rr_setup_or_halt(), wdt_window_demo_setup_or_halt(), webp_demo_setup_or_halt(), wifi_hal_setup_or_halt(), wk_setup_or_halt(), and wlun_setup_or_halt().
|
nodiscard |
Polled non-blocking read from the J-Link OB VCOM console.
Polled non-blocking read from the debug VCOM console.
Drains up to cap bytes from SCI8 RDR while RDRF stays set. Stops (without error) the first time RDRF clears so the call never blocks waiting for a host that is silent.
| [out] | out | Destination buffer (non-NULL when cap > 0). |
| [in] | cap | Capacity of out in bytes. |
| [out] | out_len | Number of bytes actually read; non-NULL. |
| k_ra8_ok | Read complete; *out_len in [0, cap]. |
| k_ra8_err_invalid_arg | out / out_len NULL with non-zero cap. |
| k_ra8_err_not_initialized | Console not initialized. |
Definition at line 333 of file ra8_board_ra8p1.c.
References k_ra8_board_uart_console_sci_channel, k_ra8_err_invalid_arg, k_ra8_err_not_initialized, k_ra8_ok, ra8_sci_getc_polling(), and s_uart_console_initialized.
|
nodiscard |
Polled blocking write to the J-Link OB VCOM console.
Polled blocking write to the debug VCOM console.
| [in] | data | Bytes to transmit; must be non-NULL when len > 0. |
| [in] | len | Number of bytes in data. |
| k_ra8_ok | All bytes pushed to TDR. |
| k_ra8_err_invalid_arg | data NULL with non-zero len. |
| k_ra8_err_not_initialized | ra8_board_uart_console_init not called. |
Definition at line 319 of file ra8_board_ra8p1.c.
References k_ra8_board_uart_console_sci_channel, k_ra8_err_invalid_arg, k_ra8_err_not_initialized, k_ra8_ok, ra8_sci_write_polling(), and s_uart_console_initialized.
Referenced by adc_diag_write(), al_print(), app_launch_hil_emit_pass(), app_print(), app_shell_hil_emit_pass(), bm_print(), bs_print(), c6_cam_put_u32(), c6_cam_puts(), c6_fwver_put_hex(), c6_fwver_put_text(), c6_fwver_put_u32(), c6_fwver_puts(), c6_hosted_put_hex(), c6_hosted_put_u32(), c6_hosted_puts(), c6_join_put_hex(), c6_join_put_u32(), c6_join_puts(), c6_probe_put_hex(), c6_probe_put_u32(), c6_probe_puts(), c6_wifi_put_hex(), c6_wifi_put_text(), c6_wifi_put_u32(), c6_wifi_puts(), cache_hal_emit(), cache_mpu_emit(), cam_put_hex(), cam_put_u32(), cam_puts(), cdc_sci_write(), ch_print(), cm_print(), crc_demo_one_iter(), demo_drain_print_job(), demo_emit(), demo_print(), demo_puts(), demo_read_test_file(), demo_report(), dfu_sci_write(), dfu_sci_write(), drw_blend_print_hex(), drw_blend_print_pass(), dtc_coh_report(), dualcore_bg_hil_emit_pass(), dualcore_mailbox_hil_emit_pass(), ec_print(), ef_print(), ehb_write(), eoh_print(), eop_log_sink(), eop_print(), ep_emit(), ep_print(), erb_print(), es_print(), est_print(), etoc_print(), ez_print(), fc_log_sink(), fc_print(), fileops_sci_write(), fs_fmt_print(), gh_print(), gptp_write(), hid_sci_write(), hid_sci_write(), iic_print(), imp_print(), imu_demo_tx(), internal_audio_loopback_print_count(), internal_bkup_demo_report_survival(), internal_demo_log(), internal_demo_print(), internal_demo_write_bytes(), internal_emit_pass(), internal_emit_tick(), internal_log_sink(), internal_lpm_demo_one_wake(), internal_motor_3phase_print_duty(), internal_mpu_simple_emit_banner(), internal_npu_infer_write(), internal_npu_smoke_write(), internal_npu_vela_write(), internal_pc_print(), internal_print(), internal_puts(), internal_rc_print(), internal_rcs_print(), internal_report(), internal_rng_demo_emit_one_line(), internal_sd_demo_print(), internal_sdcard_log(), internal_tc_print(), internal_td_print(), internal_usb_audio_log(), ipc_demo_log(), iu_print(), iv_print(), kat_setup_or_halt(), kb_print(), l3_write(), lk_print(), lpi_do_work(), ls_print(), main(), mem_print(), mg_print(), microsd_sci_write(), mlun_sci_write(), modem_tx(), mpu_boot_emit(), ospirw_sci_write(), pdm_demo_tx(), riic_target_on_event(), rot_write(), sb_write(), sbns_console_print_hex32(), sbns_console_say(), scb_demo_write(), sd_demo_print(), sd_print(), sdhi_card_print(), sdhi_demo_print(), sdmsc_sci_write(), selftest_sci_write(), selftest_sci_write(), selftest_sci_write(), selftest_sci_write(), selftest_sci_write(), sh_print(), tb_print(), timer_demo_one_capture(), tsn_write(), wa_print(), wc_print(), wd_print(), wdt_rr_arm_and_wait_for_reset(), wdt_window_demo_banner(), wifi_hal_put_hex(), wifi_hal_put_u32(), wifi_hal_puts(), wk_print(), and wlun_sci_write().
| const char* const k_ra8_board_doc_rev = "R01UH1064EJ (chip HUM)" |
"R20UT5523EG0101 Rev 1.01".
"R01UH1064EJ (chip HUM)".
Definition at line 48 of file ra8_board_ra8p1.c.
Referenced by ra8_board_get_info().
| const char* const k_ra8_board_mcu = "R7KA8P1KFLCAC" |
"R7KA8D2KFLCAC".
"R7KA8P1KFLCAC".
Definition at line 49 of file ra8_board_ra8p1.c.
Referenced by ra8_board_get_info().
| const char* const k_ra8_board_name = "RA8P1 foundation board" |
Human-readable strings identifying this BSP target.
Returned by ra8_board_get_info() so applications can log / verify the board they were built for. All three are ASCII string literals with permanent storage duration. "EK-RA8D2 v1".
Definition at line 47 of file ra8_board_ra8p1.c.
Referenced by ra8_board_get_info().
|
static |
Lookup table from ra8_board_led_id_t to ra8_port_pin_t.
Index by ra8_board_led_id_t (LED1=0, LED2=1, LED3=2). Provisional pins mirrored from the EK-RA8D2 layout; valid GPIO outputs on the RA8P1 (chip HUM R01UH1064EJ Ch 20). TODO(EK-RA8P1 UM / ra8p1_kicad): re-derive from schematic.
Definition at line 75 of file ra8_board_ra8p1.c.
|
static |
Lookup table from ra8_board_sw_id_t to ICU IRQ channel.
Definition at line 156 of file ra8_board_ra8p1.c.
|
static |
Lookup table from ra8_board_sw_id_t to ra8_port_pin_t.
SW1 -> P009, SW2 -> P008 (provisional; valid IRQ-capable GPIO inputs on the RA8P1, chip HUM R01UH1064EJ Ch 20). TODO(EK-RA8P1 UM / ra8p1_kicad).
Definition at line 148 of file ra8_board_ra8p1.c.
|
static |
Tracks whether ra8_board_uart_console_init has succeeded.
Set true after ra8_sci_init returns ok and the PFS routes are programmed. The write/read/flush helpers refuse to forward to ra8_sci while this flag is false so callers cannot drive an unconfigured channel.
Definition at line 251 of file ra8_board_ra8p1.c.