LPC5502 New Project builds with severe warnings

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LPC5502 New Project builds with severe warnings

1,070 次查看
ttahut
Contributor III

I just created the attached project for an LPC5502 board.  The project is straight out of the configuration tool.  The project builds, but there are rather severe warnings in the i2c component- too many initializers for an array:

LPC5502.h:25341:52: warning: excess elements in array initializer

25341 | #define USART7_BASE (0x40098000u)

I don't typically worry about warnings too much at this stage, but providing too many initializers can lead strange errors.  Is there something missing in the sdk, or am I missing some configuration setting?  I have not tried the i2c component at runtime yet so I don't know if there is a real problem there or not.

0 项奖励
回复
5 回复数

1,056 次查看
RaRo
NXP TechSupport
NXP TechSupport

Hello @ttahut,

Just for double check, which SDK and version are you using?

Could you please use the newest LPC5502's SDK and MCUXpresso IDE version to build your project? In our side, we built it without the LPC5502's SDK and the warnings that you mentioned appear, but after installed the SDK the build was made without errors or warnings.

Warm regards, Raul.

0 项奖励
回复

1,039 次查看
ttahut
Contributor III

According to the configuration tool it is version 2.14.0.  See the screen shots in below.  I do not see a newer version on the website?  I'm not sure how these screenshots will show up for you so I also attached a pdf.

ttahut_0-1702483312114.png

Likewise the plugins folder also shows the 2.14 version.

ttahut_1-1702483385403.png

 

 

0 项奖励
回复

1,030 次查看
RaRo
NXP TechSupport
NXP TechSupport

Hello @ttahut,

After double check the issue, we found out that these warnings had something to do with the MCU package you have chosen: LPC5502JHI48.

In the LPC55S0x/LPC550x Preliminary data sheet. Section 3.1 Ordering options. and LPC55S0x/LPC550x User manual. Section 32.5.1 Function Summary., it is mentioned that the Flexcomm 7 does not exist on HVQFN48: "HVQFN48: up to 7 Flexcomm interfaces (UART up to 7, I2C up to 7, I2S up to 4 and SPI up to 3) + 1 HS SPI."

If you check the FSL_FEATURE_SOC_SPI_COUNT in LPC5502_features.h you might find that the number of SPI is 4 instead of the expected 7 for the LPC5502JBD64 package.

Warm regards, Raul.

0 项奖励
回复

1,027 次查看
ttahut
Contributor III

I added #ifdef as below in lpc5502.h for the i2c defines and similarly for the usart defines.  It appears i2c, usart, and spi code are all incorrectly generated.  I removed the spi driver so I did not need to fix that section of the file.

#if defined(CPU_LPC5502JHI48)

#define I2C_BASE_ADDRS { I2C0_BASE, I2C1_BASE, I2C2_BASE, I2C3_BASE, I2C4_BASE, I2C5_BASE, I2C6_BASE }

/** Array initializer of I2C peripheral base pointers */

#define I2C_BASE_PTRS { I2C0, I2C1, I2C2, I2C3, I2C4, I2C5, I2C6 }

#else

#define I2C_BASE_ADDRS { I2C0_BASE, I2C1_BASE, I2C2_BASE, I2C3_BASE, I2C4_BASE, I2C5_BASE, I2C6_BASE, I2C7_BASE }

/** Array initializer of I2C peripheral base pointers */

#define I2C_BASE_PTRS { I2C0, I2C1, I2C2, I2C3, I2C4, I2C5, I2C6, I2C7 }

#endif

0 项奖励
回复

1,021 次查看
RaRo
NXP TechSupport
NXP TechSupport

Hello @ttahut,

As you mentioned, the code generated in the LPC5502.h includes all the available modules for the LPC5502JBD64 package. So, a fix has to be made in order to avoid those warnings while using the LPC5502JHI48 part, like the fix you have made.

Could we help with something else related this issue?

Warm regards, Raul.

0 项奖励
回复