Skip to content

Commit

Permalink
chore(Boards,CMSIS,PeriphDrivers): Add linker fixes and SKBD features…
Browse files Browse the repository at this point in the history
… for MAX32572 to prep for release (#890)

Co-authored-by: Jake-Carter <[email protected]>
Co-authored-by: sihyung-maxim <[email protected]>
Co-authored-by: Scheiffler <[email protected]>
Co-authored-by: victor levi <[email protected]>
Co-authored-by: ahmetyazicii <[email protected]>
  • Loading branch information
6 people authored Jan 26, 2024
1 parent c74ead3 commit 8a79a2d
Show file tree
Hide file tree
Showing 46 changed files with 2,535 additions and 222 deletions.
9 changes: 8 additions & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#
# Copyright (C) 2022-2023 Maxim Integrated Products, Inc. All Rights Reserved.
# (now owned by Analog Devices, Inc.),
# Copyright (C) 2023 Analog Devices, Inc. All Rights Reserved. This software
# Copyright (C) 2023-2024 Analog Devices, Inc. All Rights Reserved. This software
# is proprietary to Analog Devices, Inc. and its licensors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -50,6 +50,13 @@
- '**/Libraries/PeriphDrivers/max32570_files.mk'
- '**/Libraries/PeriphDrivers/Include/MAX32570/**/*'

'MAX32572':
- '**/*me55*.*'
- '**/Libraries/Boards/MAX32572/**/*'
- '**/Libraries/CMSIS/Device/Maxim/MAX32572/**/*'
- '**/Libraries/PeriphDrivers/max32572_files.mk'
- '**/Libraries/PeriphDrivers/Include/MAX32572/**/*'

'MAX32650':
- '**/Examples/MAX32650/**/*'
- '**/*me10*.*'
Expand Down
65 changes: 30 additions & 35 deletions Libraries/Boards/MAX32572/EvKit_V1/Include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*
* Copyright (C) 2022-2023 Maxim Integrated Products, Inc. All Rights Reserved.
* (now owned by Analog Devices, Inc.),
* Copyright (C) 2023 Analog Devices, Inc. All Rights Reserved. This software
* Copyright (C) 2023-2024 Analog Devices, Inc. All Rights Reserved. This software
* is proprietary to Analog Devices, Inc. and its licensors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -54,15 +54,15 @@ extern "C" {
#define CONSOLE_BAUD 115200 /// Console baud rate
#endif

#ifndef MX25_BAUD
#define MX25_BAUD 3000000
#endif
#define EXT_FLASH_SPIXFC_BAUD 3000000
#define EXT_FLASH_SPIXFM_BAUD 24000000

// #define MX25_SPI MXC_SPIXC
// #define MX25_SSEL 0
// // #define SPI_CHAR_BITS 8
#define SPIXFC_CMD_VAL 0x0B
#define SPIXFM_BUS_IDLE_VAL 0x1000

// const spixc_cfg_t mx25_spixc_cfg;
#define TS_I2C MXC_I2C0
#define TS_I2C_FREQ MXC_I2C_STD_MODE
#define TS_I2C_TARGET_ADDR 0x48

/**
* \brief Initialize the BSP and board interfaces.
Expand Down Expand Up @@ -90,40 +90,35 @@ int Console_Shutdown(void);
int Console_PrepForSleep(void);

/**
* \brief Initialize the SPI peripheral to use for MX25
* \returns #E_NO_ERROR if everything is successful
* @brief Writes data to external flash.
* @note This function must be executed from RAM.
* @param address Address in external flash to start writing from.
* @param length Number of bytes to be written.
* @param buffer Pointer to data to be written to external flash.
* @return #EF_E_SUCCESS If function is successful.
* @note make sure to disable SFCC and interrupts; before running this function
*/
int MX25_Board_Init(void);
int MXC_Ext_Write(uint32_t address, uint32_t length, uint8_t *buffer);

/**
* \brief Translation function to implement SPI Read transaction
* @param read Pointer to where master will store data.
* @param len Number of characters to send.
* @param deassert Deassert slave select at the end of the transaction.
* @param width spi_width_t for how many data lines to use
* \returns #E_NO_ERROR if successful, !=0 otherwise
* @brief Reads data from external flash
* @note This function must be executed from RAM.
* @param[in] address The address to read from
* @param buffer The buffer to read the data into
* @param[in] len The length of the buffer
* @return #EF_E_SUCCESS If function is successful.
* @note make sure to disable SFCC and interrupts; before running this function
*/

int MX25_Board_Read(uint8_t *read, unsigned len, unsigned deassert, mxc_spixf_width_t width);
/**
* \brief Translation function to implement SPI Write transaction
* @param write Pointer to data master will write.
* @param len Number of characters to send.
* @param deassert Deassert slave select at the end of the transaction.
* @param width spi_width_t for how many data lines to use
* \returns #E_NO_ERROR if successful, !=0 otherwise
*/

int MX25_Board_Write(const uint8_t *write, unsigned len, unsigned deassert,
mxc_spixf_width_t width);
int MXC_Ext_Read(int address, uint8_t *buffer, int len);

/**
* \brief Send clocks on SCLK.
* @param len Number of characters to send.
* @param deassert Deassert slave select at the end of the transaction.
* \returns #E_NO_ERROR if successful, !=0 otherwise
* @brief Erases the sector of external flash at the specified address.
* @note This function must be executed from RAM.
* @param address Any address within the sector to erase.
* @return #EF_E_SUCCESS If function is successful.
* @note make sure to disable SFCC and interrupts; before running this function
*/
int MX25_Clock(unsigned len, unsigned deassert);
int MXC_Ext_SectorErase(int address);

#ifdef __cplusplus
}
Expand Down
Loading

0 comments on commit 8a79a2d

Please sign in to comment.