Skip to content
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

SAME7/V7/S7 SDK support #171

Open
wants to merge 47 commits into
base: master
Choose a base branch
from
Open

Conversation

IvanRuzavin
Copy link
Contributor

@IvanRuzavin IvanRuzavin commented Dec 16, 2024

Added support for SAM MCUs.

This PR is connected to this core PR due to necessity of floating point enabling.

ATSAM SDK testing status can be found here

# SEPARATE MODULES
set(module_list "")
set(module_list_supported "")
set_module_support(module_list module_list_supported ${MCU_NAME} "hal_ll_layer")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add all other missing modules such as CAN. They are defined in a separate cmake file anyway.

Copy link
Contributor Author

@IvanRuzavin IvanRuzavin Dec 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added CAN, DMA and RTC.

static const hal_ll_adc_pin_map_t _adc_map[] =
{
#ifdef ADC0_PD30_CH0
{PD30, HAL_LL_ADC0_BASE_ADDR, hal_ll_adc_module_num(ADC_MODULE_0), HAL_LL_ADC_CHANNEL_0},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change all occurrences of Pxy to GPIO_Pxy.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed all occurrences in all pin_map header files.

targets/arm/mikroe/sam/include/gpio/hal_ll_gpio_port.h Outdated Show resolved Hide resolved
**/
typedef struct hal_ll_gpio_interrupt_register_handle
{
uint32_t enable;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use hal_ll_base_addr_t typedef instead of uint32_t?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For all implementations including the AI-generated ones we use uint32_t for gpio headers. I can make an exception for this file, but I think we can follow the original approach.

targets/arm/mikroe/sam/include/hal_ll_pmc.h Outdated Show resolved Hide resolved
/*!< @brief UART hw specific module values */
typedef struct
{
uint16_t pin_tx;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check file for appropriate use of hal_ll_base_addr_t and hal_ll_pin_name_t.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed it for all source files where needed.

IvanRuzavin and others added 18 commits December 16, 2024 20:44
Co-authored-by: Strahinja Jacimovic <strahinja.jacimovic@mikroe.com>
Co-authored-by: Strahinja Jacimovic <strahinja.jacimovic@mikroe.com>
…_1/hal_ll_uart.c

Co-authored-by: Strahinja Jacimovic <strahinja.jacimovic@mikroe.com>
Co-authored-by: Strahinja Jacimovic <strahinja.jacimovic@mikroe.com>
Co-authored-by: Strahinja Jacimovic <strahinja.jacimovic@mikroe.com>
…_1/hal_ll_uart.c

Co-authored-by: Strahinja Jacimovic <strahinja.jacimovic@mikroe.com>
…_1/hal_ll_uart.c

Co-authored-by: Strahinja Jacimovic <strahinja.jacimovic@mikroe.com>
…_1/hal_ll_uart.c

Co-authored-by: Strahinja Jacimovic <strahinja.jacimovic@mikroe.com>
Co-authored-by: Strahinja Jacimovic <strahinja.jacimovic@mikroe.com>
Co-authored-by: Strahinja Jacimovic <strahinja.jacimovic@mikroe.com>
Co-authored-by: Strahinja Jacimovic <strahinja.jacimovic@mikroe.com>
Co-authored-by: Strahinja Jacimovic <strahinja.jacimovic@mikroe.com>
…1/hal_ll_adc.c

Co-authored-by: Strahinja Jacimovic <strahinja.jacimovic@mikroe.com>
…1/hal_ll_adc.c

Co-authored-by: Strahinja Jacimovic <strahinja.jacimovic@mikroe.com>
…1/hal_ll_i2c_master.c

Co-authored-by: Strahinja Jacimovic <strahinja.jacimovic@mikroe.com>
…tation_1/hal_ll_spi_master.c

Co-authored-by: Strahinja Jacimovic <strahinja.jacimovic@mikroe.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants