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

extFlash: Add Renesas AT25SF321B & XTX XT25F32 Support #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
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
22 changes: 16 additions & 6 deletions source/ti/common/flash/no_rtos/extFlash/ext_flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Target Device: cc13xx_cc26xx

******************************************************************************

Copyright (c) 2015-2024, Texas Instruments Incorporated
All rights reserved.

Expand Down Expand Up @@ -40,8 +40,8 @@
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

******************************************************************************


*****************************************************************************/

/* -----------------------------------------------------------------------------
Expand Down Expand Up @@ -115,6 +115,11 @@ static const ExtFlashInfo_t flashInfo[] =
.devId = 0x14, //
.deviceSize = 0x100000 // 1 MByte (8 Mbit)
},
{
.manfId = 0x1F, // Renesas AT25SF321B
.devId = 0x15,
.deviceSize = 0x400000 // 4 MByte (32 Mbit)
},
{
.manfId = 0xEF, // WinBond W25X40CL
.devId = 0x12,
Expand All @@ -125,6 +130,11 @@ static const ExtFlashInfo_t flashInfo[] =
.devId = 0x11,
.deviceSize = 0x040000 // 256 KByte (2 Mbit)
},
{
.manfId = 0x0B, // XTX XT25F32
.devId = 0x15,
.deviceSize = 0x400000 // 4 MByte (32 Mbit)
},
{
.manfId = 0x0,
.devId = 0x0,
Expand Down Expand Up @@ -160,7 +170,7 @@ static int extFlashWaitPowerDown(void);
*/
static void extFlashSelect(void)
{
#if !defined(DeviceFamily_CC23X0R5) && !defined(DeviceFamily_CC23X0R53) && !defined(DeviceFamily_CC23X0R2) && !defined(DeviceFamily_CC23X0R22)
#if !defined(DeviceFamily_CC23X0R5) && !defined(DeviceFamily_CC23X0R53) && !defined(DeviceFamily_CC23X0R2) && !defined(DeviceFamily_CC23X0R22)
GPIO_clearDio(BSP_IOID_FLASH_CS);
#else
bspGpioWrite(BSP_IOID_FLASH_CS, 0);
Expand All @@ -178,7 +188,7 @@ static void extFlashSelect(void)
*/
static void extFlashDeselect(void)
{
#if !defined(DeviceFamily_CC23X0R5) && !defined(DeviceFamily_CC23X0R53) && !defined(DeviceFamily_CC23X0R2) && !defined(DeviceFamily_CC23X0R22)
#if !defined(DeviceFamily_CC23X0R5) && !defined(DeviceFamily_CC23X0R53) && !defined(DeviceFamily_CC23X0R2) && !defined(DeviceFamily_CC23X0R22)
GPIO_setDio(BSP_IOID_FLASH_CS);
#else
bspGpioWrite(BSP_IOID_FLASH_CS, 1);
Expand Down Expand Up @@ -397,7 +407,7 @@ bool extFlashOpen(void)
bspSpiOpen(SPI_BIT_RATE, BSP_SPI_CLK_FLASH);

/* GPIO pin configuration */
#if !defined(DeviceFamily_CC23X0R5) && !defined(DeviceFamily_CC23X0R53) && !defined(DeviceFamily_CC23X0R2) && !defined(DeviceFamily_CC23X0R22)
#if !defined(DeviceFamily_CC23X0R5) && !defined(DeviceFamily_CC23X0R53) && !defined(DeviceFamily_CC23X0R2) && !defined(DeviceFamily_CC23X0R22)
IOCPinTypeGpioOutput(BSP_IOID_FLASH_CS);
#else
bspGpioSetConfig(BSP_IOID_FLASH_CS, SPI_CS_STD_OUT);
Expand Down