Skip to content

Commit 073f677

Browse files
authored
Merge pull request #420 from MikroElektronika/mikrosdk-2.15.0
mikroSDK-2.15.0
2 parents 89b3e4e + 22b1fc9 commit 073f677

File tree

82 files changed

+14036
-336
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+14036
-336
lines changed

bsp/board/include/boards/clicker_ra4m1/board.h

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,39 @@ extern "C"
4949
{
5050
#endif
5151

52+
// Hardware revision number
53+
#define BOARD_REV_MAJOR (1)
54+
#define BOARD_REV_MINOR (01)
55+
5256
#define BOARD_NAME "RA4M1 Clicker"
5357

54-
// Mapping
55-
// Only Bare Metal support is available at the moment
58+
#include "mikrobus.h"
59+
60+
/// Mapping
61+
#define MIKROBUS_1 1
62+
#define MIKROBUS_1_AN GPIO_P000
63+
#define MIKROBUS_1_RST GPIO_P407
64+
#define MIKROBUS_1_CS GPIO_P103
65+
#define MIKROBUS_1_SCK GPIO_P102
66+
#define MIKROBUS_1_MISO GPIO_P100
67+
#define MIKROBUS_1_MOSI GPIO_P101
68+
#define MIKROBUS_1_PWM GPIO_P107
69+
#define MIKROBUS_1_INT GPIO_P302
70+
#define MIKROBUS_1_RX GPIO_P410
71+
#define MIKROBUS_1_TX GPIO_P411
72+
#define MIKROBUS_1_SCL GPIO_P205
73+
#define MIKROBUS_1_SDA GPIO_P206
74+
75+
// LEDs
76+
#define LED_1 GPIO_P409
77+
#define LED_2 GPIO_P408
78+
79+
// Buttons
80+
#define BUTTON_1 GPIO_P304
81+
#define BUTTON_2 GPIO_P301
82+
83+
#define USB_UART_TX HAL_PIN_NC
84+
#define USB_UART_RX HAL_PIN_NC
5685

5786
#ifdef __cplusplus
5887
}

changelog/v2.15.0/changelog.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<p align="center">
2+
<img src="http://www.mikroe.com/img/designs/beta/logo_small.png?raw=true" alt="MikroElektronika"/>
3+
</p>
4+
5+
---
6+
7+
**[BACK TO MAIN FILE](../../changelog.md)**
8+
9+
---
10+
11+
# `v2.15.0`
12+
13+
+ released: 2025-08-07
14+
15+
## Changes
16+
17+
- [`v2.15.0`](#v2150)
18+
- [Changes](#changes)
19+
- [RENESAS](#renesas)
20+
- [Fixes](#fixes)
21+
- [mikroSDK](#mikrosdk)
22+
- [NEW HARDWARE](#new-hardware)
23+
24+
### <font color=red>RENESAS</font>
25+
26+
**RA4M1 MCUs supported!**
27+
28+
| MCU |
29+
| :------------: |
30+
| R7FA4M1AB3CFP |
31+
| R7FA4M1AB2CLJ |
32+
| R7FA4M1AB3CFM |
33+
| R7FA4M1AB3CNB |
34+
| R7FA4M1AB3CFL |
35+
| R7FA4M1AB3CNE |
36+
| R7FA4M1AB3CNF |
37+
38+
**Supported modules:**
39+
40+
+ ADC (Full module support)
41+
+ SPI (Full module support)
42+
+ UART (Full module support)
43+
+ I2C (Full module support)
44+
+ PWM (Full module support)
45+
+ GPIO (Full module support)
46+
+ 1-Wire (Full module support)
47+
48+
### Fixes
49+
50+
#### mikroSDK
51+
52+
- Fixed the build issue for MCUs STM32C011J6 and STM32C011J4
53+
- Now setups with these MCUs can be successfully created
54+
- SPI transfer API is now also available for the 157 MCUs with AI generated SDK support
55+
- Minor fixes and improvements regarding the SPI transfer API implementation
56+
57+
### NEW HARDWARE
58+
59+
> NOTE:
60+
>> If any new hardware was added to current version, it will be listed here.
61+
62+
Support added for following hardware:
63+
64+
---
65+
66+
**[BACK TO MAIN FILE](../../changelog.md)**
67+
68+
---

cmake/utils.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ function(find_chip_architecture _chip_architecture)
175175
set(${_chip_architecture} "arm" PARENT_SCOPE)
176176
elseif(${MCU_NAME} MATCHES "^(AT)?SAM.*")
177177
set(${_chip_architecture} "arm" PARENT_SCOPE)
178+
elseif(${MCU_NAME} MATCHES "^R7.*")
179+
set(${_chip_architecture} "arm" PARENT_SCOPE)
178180
else()
179181
set(${_chip_architecture} "UNSUPPORTED_CHIP_SELECTED_FOR_FOLLOWING_IMPLEMENTATION" PARENT_SCOPE)
180182
endif()
@@ -616,7 +618,7 @@ endfunction()
616618
function(core_implementation_select mcu core_implementation)
617619
find_chip_architecture(chip_architecture)
618620
if(${chip_architecture} STREQUAL "arm")
619-
if(${mcu} MATCHES "(^STM32.*)|(^MK.*)|(^TM4C.*)|(^(AT)?SAM.*)")
621+
if(${mcu} MATCHES "(^STM32.*)|(^MK.*)|(^TM4C.*)|(^(AT)?SAM.*|(^R7F.+))")
620622
set(${core_implementation} "core/implementation_1/hal_ll_core.c" PARENT_SCOPE)
621623
else()
622624
set(${core_implementation} "core/implementation_2/hal_ll_core.c" PARENT_SCOPE)

drv/lib/src/lib_drv_spi_master/drv_spi_master.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,8 @@ err_t spi_master_transfer( spi_master_t *obj, uint8_t *write_data_buffer,
435435
if ( _acquire( obj, false ) != ACQUIRE_FAIL ) {
436436
#if DRV_TO_HAL
437437
return hal_spi_master_transfer( &obj->handle, write_data_buffer,
438-
read_data_buffer,
439-
data_length );
438+
read_data_buffer,
439+
data_length );
440440
#else
441441
hal_spi_master_handle_register_t *hal_handle = ( hal_spi_master_handle_register_t* )hal_is_handle_null( (handle_t *)&obj->handle );
442442
err_t hal_status = HAL_SPI_MASTER_SUCCESS;
@@ -468,9 +468,9 @@ err_t spi_master_transfer( spi_master_t *obj, uint8_t *write_data_buffer,
468468
hal_handle->init_state = true;
469469
}
470470

471-
hal_status = hal_spi_master_transfer( (handle_t *)&hal_handle, write_data_buffer,
472-
read_data_buffer,
473-
data_length );
471+
hal_status = hal_ll_spi_master_transfer( (handle_t *)&hal_handle, write_data_buffer,
472+
read_data_buffer,
473+
data_length );
474474

475475
if (hal_status == HAL_SPI_MASTER_MODULE_ERROR)
476476
{

hal/interface/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ elseif(${MCU_NAME} MATCHES "(^MK(.+)$)")
2525
set(vendor_id "nxp")
2626
elseif(${MCU_NAME} MATCHES "(^TM4C1(.+)$)")
2727
set(vendor_id "tiva")
28+
elseif(${MCU_NAME} MATCHES "(^R7(.+)$)")
29+
set(vendor_id "renesas")
2830
elseif(${MCU_NAME} MATCHES "(^PIC32(.+)$)")
2931
set(vendor_id "pic32")
3032
elseif(${MCU_NAME} MATCHES "(^PIC18(.+)$)")

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
"display-name": "mikroSDK",
44
"description": "MikroSDK 2.0 is an embedded software development framework designed to simplify and accelerate application development on Mikroe hardware platform, specifically for Click Boards and other extension board drivers, on a broad range of microcontroller vendors and architectures. It includes peripheral libraries and drivers, middleware, board support, and application layer libraries among others.",
55
"icon": "images/icon-mikroSDK.png",
6-
"manifest-version": "1.0.28"
6+
"manifest-version": "1.0.29"
77
}

platform/mikrosdk_version/include/mikrosdk_version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ extern "C"{
6060
* @note changes in minor version indicate that there have been
6161
* significant improvements and/or features added
6262
*/
63-
#define mikroSDK_MINOR_VERSION 14
63+
#define mikroSDK_MINOR_VERSION 15
6464

6565
/**
6666
* @brief mikroSDK_PATCH_VERSION
6767
* @note changes in patch version indicate smaller updates,
6868
* bug fixes and improvements
6969
*/
70-
#define mikroSDK_PATCH_VERSION 6
70+
#define mikroSDK_PATCH_VERSION 0
7171

7272
/**
7373
* @brief mikroSDK_GET_VERSION

platform/ring/lib/src/ring.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,11 @@ bool ring_buf8_push( ring_buf8_t *ring, uint8_t data_ )
7070
uint8_t ring_buf8_pop( ring_buf8_t *ring )
7171
{
7272
uint8_t result;
73+
74+
// GCC & Clang compiler files for Renesas are not included into the project.
75+
#if ( vendor != renesas )
7376
assert( ring->size > 0 );
77+
#endif
7478

7579
result = ring->buffer[ ring->tail ];
7680
ring->tail = ( ring->tail + 1 ) % ring->capacity;

targets/arm/mikroe/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ elseif(${MCU_NAME} MATCHES "(^MK(.+)$)")
66
elseif(${MCU_NAME} MATCHES "(^TM4C1(.+)$)")
77
## TIVA has only the 71 MCUs already implemented
88
set(vendor_id "tiva")
9+
elseif(${MCU_NAME} MATCHES "(^R7(.+)$)")
10+
set(vendor_id "renesas")
911
elseif(${MCU_NAME} MATCHES "(^(AT)?SAM(.+)$)")
1012
set(vendor_id "sam")
1113
else()

targets/arm/mikroe/ai_generated/stm32/include/spi_master/hal_ll_spi_master.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,31 @@ hal_ll_err_t hal_ll_spi_master_read( handle_t *handle, uint8_t *read_data_buffer
212212
*/
213213
hal_ll_err_t hal_ll_spi_master_write_then_read( handle_t *handle, uint8_t *write_data_buffer, size_t length_write_data, uint8_t *read_data_buffer, size_t length_read_data );
214214

215+
/**
216+
* @brief Performs simultaneous write and read on SPI bus.
217+
*
218+
* Executes a full-duplex SPI transfer. While writing `write_data_buffer`,
219+
* the incoming bytes from the SPI slave are placed into `read_data_buffer`.
220+
* This function is suitable for devices that require simultaneous
221+
* transmission and reception.
222+
*
223+
* @param[in] handle HAL context object handle.
224+
* @param[in] write_data_buffer Pointer to data to be written to the bus.
225+
* @param[out] read_data_buffer Pointer to buffer where read data will be stored.
226+
* @param[in] data_length Number of bytes to transfer.
227+
*
228+
* @return hal_ll_err_t Returns #HAL_LL_SPI_MASTER_SUCCESS on success,
229+
* otherwise returns #HAL_LL_SPI_MASTER_MODULE_ERROR
230+
* if handle is invalid or data_length is 0.
231+
*
232+
* @note This function assumes the SPI module is already initialized via
233+
* #hal_ll_spi_master_register_handle and #hal_ll_module_configure_spi.
234+
*/
235+
hal_ll_err_t hal_ll_spi_master_transfer( handle_t *handle,
236+
uint8_t *write_data_buffer,
237+
uint8_t *read_data_buffer,
238+
size_t data_length );
239+
215240
/**
216241
* @brief Closes SPI Master HAL and HAL_LOW_LEVEL context object.
217242
*

0 commit comments

Comments
 (0)