FLEXBUS_Init trouble?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

FLEXBUS_Init trouble?

ソリューションへジャンプ
1,771件の閲覧回数
biafra
Senior Contributor I

Hi everyone,

I'm using a custom board based on K66FN2M0VMD18 chip with MCUXpresso 10.0.2 (build 411) and an SDK created with online tools.

It seems that there an issue on using two different chip select pins on external flexbus.

Based on the example provided with the SDK, i think that the initialization procedure should be:

//chip select 1

FLEXBUS_GetDefaultConfig(&flexbusUserConfig);

//do some modification on the dafault config for CS1

/* Initialize and configure FLEXBUS module */
FLEXBUS_Init(FB, &flexbusUserConfig); //initialize CS1

And then:

//chip select 2

FLEXBUS_GetDefaultConfig(&flexbusUserConfig);

//do some modification on the dafault config for CS2

/* Initialize and configure FLEXBUS module */
FLEXBUS_Init(FB, &flexbusUserConfig); //initialize CS2

At this point the configuration of CS1 is wiped out because of FLEXBUS_Init() function.

...

for (chip = 0; chip < FB_CSAR_COUNT; chip++)
{
   /* Reset CSMR register, all chips not valid (disabled) */
   base->CS[chip].CSMR = 0x0000U;
   /* Set default base address */
   base->CS[chip].CSAR &= (~FB_CSAR_BA_MASK);
   /* Reset FB_CSCRx register */
   base->CS[chip].CSCR = 0x0000U;
}
...

When the FLEXBUS_Init() function is called for the second time, it deletes the settings of CS1.

Which is the correct way to initialize two different chip select pins?

Many thanks

Biafra

1 解決策
1,464件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

Hi Francesco,

Yes, you are right. FLEXBUS_Init() can only be used one time. Otherwise it will clear the work before.In fact, the MCUXpresso SDK V2.2.0 software Flexbus driver doesn't provide full features of the Flexbus module.
Customer can add related secondary wait states setting function in application code.
Sorry for that may bring any inconvenience to you.

Regards

Jing

元の投稿で解決策を見る

3 返答(返信)
1,465件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

Hi Francesco,

Yes, you are right. FLEXBUS_Init() can only be used one time. Otherwise it will clear the work before.In fact, the MCUXpresso SDK V2.2.0 software Flexbus driver doesn't provide full features of the Flexbus module.
Customer can add related secondary wait states setting function in application code.
Sorry for that may bring any inconvenience to you.

Regards

Jing

1,464件の閲覧回数
biafra
Senior Contributor I

Hi Jing,

Have the Flexbus driver been updated?

Many thanks,

Biafra

1,464件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

Hi Biafra,

No, it hasn't. You can see the driver version at the top of each .h file. It looks like

#define FSL_FLEXBUS_DRIVER_VERSION (MAKE_VERSION(2, 0, 1)) /*!< Version 2.0.1. */

Regards,

Jing