Skip to content

RA4M1 support #418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 73 commits into from
Aug 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
9a0fcf8
Renesas addition initial
esmaniksic Jun 3, 2025
7cd884a
Merge remote-tracking branch 'origin/master' into new-feature/ra4m1-s…
esmaniksic Jun 3, 2025
287df55
Revert unnecessary files
esmaniksic Jun 3, 2025
3113535
RA4M1 GPIO update
esmaniksic Jun 5, 2025
47d809a
GPIO update, port works
esmaniksic Jun 12, 2025
858b8ee
mcu_defs update
esmaniksic Jun 12, 2025
37069d1
GPIO ongoing, the test in SDK works
esmaniksic Jun 17, 2025
7db9600
Merge remote-tracking branch 'origin/master' into new-feature/ra4m1-s…
esmaniksic Jun 18, 2025
8c8323b
renesas low level update
esmaniksic Jun 19, 2025
0643842
pin names update
esmaniksic Jun 19, 2025
834d0a8
gpio update
esmaniksic Jun 26, 2025
a6cb9b6
gpio test wip
esmaniksic Jun 30, 2025
bfe5768
I2C write initial
esmaniksic Jul 3, 2025
cbba555
Merge remote-tracking branch 'origin/master' into new-feature/ra4m1-s…
esmaniksic Jul 3, 2025
0e95950
I2C update
esmaniksic Jul 7, 2025
4ab3baf
Added initial UART implementation -> RX works
IvanRuzavin Jul 10, 2025
bd815a9
Polling UART works -> interrupts TODO
IvanRuzavin Jul 10, 2025
fbf9551
Added startup info
Jul 10, 2025
85b5c04
Fully functional write and read
esmaniksic Jul 14, 2025
68b4ca4
removed line
esmaniksic Jul 14, 2025
0e19559
I2C removed hardcoded parts
esmaniksic Jul 16, 2025
9eba3a3
ADC initial commit (set for P000; works)
esmaniksic Jul 16, 2025
eeadcbc
Merge remote-tracking branch 'origin/master' into new-feature/ra4m1-uart
IvanRuzavin Jul 17, 2025
8d7bc32
adc update
esmaniksic Jul 17, 2025
6b14ddb
Merge remote-tracking branch 'origin/master' into new-feature/ra4m1-s…
esmaniksic Jul 21, 2025
4f91130
ADC implementation finished
esmaniksic Jul 21, 2025
2762099
RA4M1 PWM proof of concept
esmaniksic Jul 21, 2025
920e6e0
PWM ongoing
esmaniksic Jul 22, 2025
dddb26a
WIP -> interrupts still don't work
IvanRuzavin Jul 23, 2025
3f4c240
Merge remote-tracking branch 'origin/new-feature/ra4m1-sdk-support' i…
IvanRuzavin Jul 23, 2025
d804cd0
GPIO update
esmaniksic Jul 23, 2025
8cad41d
WIP update for SDK implementation
IvanRuzavin Jul 23, 2025
c499409
Merge remote-tracking branch 'origin/new-feature/ra4m1-sdk-support' i…
IvanRuzavin Jul 23, 2025
b04579d
WIP commit -> need to set baud rate dynamically
IvanRuzavin Jul 23, 2025
f461d2f
Finished polling UART and tested all features
IvanRuzavin Jul 24, 2025
3b01f6d
Reverted CMake changes
IvanRuzavin Jul 24, 2025
d3450ab
Reverted all common files that were changed
IvanRuzavin Jul 24, 2025
7edc762
Reverted all common files that were changed #2
IvanRuzavin Jul 24, 2025
91c4a74
Last changes for UART
IvanRuzavin Jul 24, 2025
565892a
Update targets/arm/mikroe/renesas/src/uart/implementation_1/hal_ll_ua…
esmaniksic Jul 24, 2025
cec4d40
Merge pull request #412 from MikroElektronika/new-feature/ra4m1-uart
IvanRuzavin Jul 24, 2025
0e66344
Functional PWM, more testing and prettifying needed
esmaniksic Jul 24, 2025
ee6691d
PWMc ode clean up and B pin test
esmaniksic Jul 24, 2025
8480bbe
Updated baud rate calculations for UART
IvanRuzavin Jul 29, 2025
32e2543
Merge pull request #416 from MikroElektronika/new-feature/ra4m1-uart
IvanRuzavin Jul 29, 2025
2ba6232
SPI done
esmaniksic Jul 29, 2025
2713068
I2C updated, ready for review
esmaniksic Jul 30, 2025
39f935f
comment fix
esmaniksic Jul 30, 2025
20ec401
PWM implementation improved, ready for review
esmaniksic Jul 30, 2025
763395b
Initial changelog added
esmaniksic Jul 30, 2025
f0b21b9
Merge branch 'mikrosdk-2.15.0' into new-feature/ra4m1-sdk-support
esmaniksic Jul 30, 2025
cba99aa
ADC improved
esmaniksic Jul 30, 2025
f33e558
1-Wire implementation added
esmaniksic Jul 31, 2025
5920641
Merge remote-tracking branch 'origin/mikrosdk-2.15.0' into new-featur…
esmaniksic Aug 4, 2025
1d54022
removed rtc, can, dma
esmaniksic Aug 4, 2025
9018076
mcu defs added
esmaniksic Aug 4, 2025
bdac955
RA4M1 update
esmaniksic Aug 4, 2025
b2f5c5d
I2C read issue resolved
esmaniksic Aug 5, 2025
b9ca144
Pin maps update
esmaniksic Aug 5, 2025
9c24a53
Pin maps update
esmaniksic Aug 5, 2025
b43ccfb
pin maps update
esmaniksic Aug 5, 2025
14a15c1
bsp added
esmaniksic Aug 5, 2025
3d6ae36
GPIO description adjustment
esmaniksic Aug 6, 2025
cb1f460
Update targets/arm/mikroe/renesas/include/gpio/hal_ll_gpio.h
esmaniksic Aug 6, 2025
972fc26
Update targets/arm/mikroe/renesas/include/gpio/hal_ll_gpio.h
esmaniksic Aug 6, 2025
28ea464
Update targets/arm/mikroe/renesas/include/i2c/hal_ll_i2c_master.h
esmaniksic Aug 6, 2025
df10d17
Update targets/arm/mikroe/renesas/include/spi_master/hal_ll_spi_master.h
esmaniksic Aug 6, 2025
e1dbfdc
Update targets/arm/mikroe/renesas/include/spi_master/hal_ll_spi_master.h
esmaniksic Aug 6, 2025
7200795
Update targets/arm/mikroe/renesas/include/uart/hal_ll_uart.h
esmaniksic Aug 6, 2025
5cecc99
Update targets/arm/mikroe/renesas/src/gpio/hal_ll_gpio.c
esmaniksic Aug 6, 2025
02c03da
Update targets/arm/mikroe/renesas/src/i2c/implementation_1/hal_ll_i2c…
esmaniksic Aug 6, 2025
8e26b82
tests folder update
esmaniksic Aug 6, 2025
b012e7a
ring comment
esmaniksic Aug 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 31 additions & 2 deletions bsp/board/include/boards/clicker_ra4m1/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,39 @@ extern "C"
{
#endif

// Hardware revision number
#define BOARD_REV_MAJOR (1)
#define BOARD_REV_MINOR (01)

#define BOARD_NAME "RA4M1 Clicker"

// Mapping
// Only Bare Metal support is available at the moment
#include "mikrobus.h"

/// Mapping
#define MIKROBUS_1 1
#define MIKROBUS_1_AN GPIO_P000
#define MIKROBUS_1_RST GPIO_P407
#define MIKROBUS_1_CS GPIO_P103
#define MIKROBUS_1_SCK GPIO_P102
#define MIKROBUS_1_MISO GPIO_P100
#define MIKROBUS_1_MOSI GPIO_P101
#define MIKROBUS_1_PWM GPIO_P107
#define MIKROBUS_1_INT GPIO_P302
#define MIKROBUS_1_RX GPIO_P410
#define MIKROBUS_1_TX GPIO_P411
#define MIKROBUS_1_SCL GPIO_P205
#define MIKROBUS_1_SDA GPIO_P206

// LEDs
#define LED_1 GPIO_P409
#define LED_2 GPIO_P408

// Buttons
#define BUTTON_1 GPIO_P304
#define BUTTON_2 GPIO_P301

#define USB_UART_TX HAL_PIN_NC
#define USB_UART_RX HAL_PIN_NC

#ifdef __cplusplus
}
Expand Down
26 changes: 24 additions & 2 deletions changelog/v2.15.0/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,34 @@

- [`v2.15.0`](#v2150)
- [Changes](#changes)
- [New Features](#new-features)
- [RENESAS](#renesas)
- [Fixes](#fixes)
- [mikroSDK](#mikrosdk)
- [NEW HARDWARE](#new-hardware)

### New Features
### <font color=red>RENESAS</font>

**RA4M1 MCUs supported!**

| MCU |
| :------------: |
| R7FA4M1AB3CFP |
| R7FA4M1AB2CLJ |
| R7FA4M1AB3CFM |
| R7FA4M1AB3CNB |
| R7FA4M1AB3CFL |
| R7FA4M1AB3CNE |
| R7FA4M1AB3CNF |

**Supported modules:**

+ ADC (Full module support)
+ SPI (Full module support)
+ UART (Full module support)
+ I2C (Full module support)
+ PWM (Full module support)
+ GPIO (Full module support)
+ 1-Wire (Full module support)

### Fixes

Expand Down
2 changes: 2 additions & 0 deletions cmake/utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ function(find_chip_architecture _chip_architecture)
set(${_chip_architecture} "arm" PARENT_SCOPE)
elseif(${MCU_NAME} MATCHES "^(AT)?SAM.*")
set(${_chip_architecture} "arm" PARENT_SCOPE)
elseif(${MCU_NAME} MATCHES "^R7.*")
set(${_chip_architecture} "arm" PARENT_SCOPE)
else()
set(${_chip_architecture} "UNSUPPORTED_CHIP_SELECTED_FOR_FOLLOWING_IMPLEMENTATION" PARENT_SCOPE)
endif()
Expand Down
2 changes: 2 additions & 0 deletions hal/interface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ elseif(${MCU_NAME} MATCHES "(^MK(.+)$)")
set(vendor_id "nxp")
elseif(${MCU_NAME} MATCHES "(^TM4C1(.+)$)")
set(vendor_id "tiva")
elseif(${MCU_NAME} MATCHES "(^R7(.+)$)")
set(vendor_id "renesas")
elseif(${MCU_NAME} MATCHES "(^PIC32(.+)$)")
set(vendor_id "pic32")
elseif(${MCU_NAME} MATCHES "(^PIC18(.+)$)")
Expand Down
5 changes: 5 additions & 0 deletions platform/ring/lib/src/ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,12 @@ bool ring_buf8_push( ring_buf8_t *ring, uint8_t data_ )
uint8_t ring_buf8_pop( ring_buf8_t *ring )
{
uint8_t result;

// TODO
// GCC & Clang compiler files for Renesas are not included into the project.
#if ( vendor != renesas )
assert( ring->size > 0 );
#endif

result = ring->buffer[ ring->tail ];
ring->tail = ( ring->tail + 1 ) % ring->capacity;
Expand Down
2 changes: 2 additions & 0 deletions targets/arm/mikroe/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ elseif(${MCU_NAME} MATCHES "(^MK(.+)$)")
elseif(${MCU_NAME} MATCHES "(^TM4C1(.+)$)")
## TIVA has only the 71 MCUs already implemented
set(vendor_id "tiva")
elseif(${MCU_NAME} MATCHES "(^R7(.+)$)")
set(vendor_id "renesas")
elseif(${MCU_NAME} MATCHES "(^(AT)?SAM(.+)$)")
set(vendor_id "sam")
else()
Expand Down
3 changes: 3 additions & 0 deletions targets/arm/mikroe/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ elseif(${MCU_NAME} MATCHES "(^ATSAM(.+)$)")
elseif(${MCU_NAME} MATCHES "(^TM4C1(.+)$)")
set(architecture_macro "TIVA")
set(architecture "TIVA")
elseif(${MCU_NAME} MATCHES "(^R7(.+)$)")
set(architecture_macro "RENESAS")
set(architecture "RENESAS")
endif()

set(header_files "")
Expand Down
Loading