AnsweredAssumed Answered

Flex BUS interface issue.( MK66 )

Question asked by maheshwar reddy on Nov 22, 2018
Latest reply on Nov 23, 2018 by Kerry Zhou

I am working with MK66FN2M0VLQ18 MCU in our customized board. I am using sdk2.0 examples for flexbus initialization.

Now we wants to generate multiple chip selects for different addresses . Now we can able to generate the chip select 0 and 1 but unable to generate the chip select 2 . we used the following initialization sequence,chip select 2 port is PORTC 18th pin of mk66.  

 

void FLEXBUS_Initialization()
{
flexbus_config_t flexbusConfig;

FLEXBUS_Init(FB, &flexbusConfig); /* Reset FlexBUS to default satus*/

FLEXBUS_GetDefaultConfig(&flexbusConfig);
flexbusConfig.chip = 0;
flexbusConfig.waitStates = 0x0FU;
flexbusConfig.chipBaseAddress = 0x60000000U;
flexbusConfig.chipBaseAddressMask = 0x7U;
flexbusConfig.portSize = kFLEXBUS_2Bytes;
flexbusConfig.group1MultiplexControl= kFLEXBUS_MultiplexGroup1_FB_CS1;


FLEXBUS_config(FB, &flexbusConfig); /* flexBus initialization for first node 1553 device */

flexbusConfig.chip = 1;
flexbusConfig.waitStates = 0x0FU;
flexbusConfig.chipBaseAddress = 0x61000000U;
flexbusConfig.chipBaseAddressMask = 0x7U;
flexbusConfig.portSize = kFLEXBUS_2Bytes;
flexbusConfig.group1MultiplexControl= kFLEXBUS_MultiplexGroup1_FB_CS1;

FLEXBUS_config(FB, &flexbusConfig); /* flexBus initialization for second node 1553 device */


flexbusConfig.chip = 2;
flexbusConfig.waitStates = 0x0FU;
flexbusConfig.chipBaseAddress = 0x62000000U;
flexbusConfig.chipBaseAddressMask = 0x7U;
flexbusConfig.portSize = kFLEXBUS_2Bytes;
flexbusConfig.group1MultiplexControl= kFLEXBUS_MultiplexGroup1_FB_CS1;

FLEXBUS_config(FB, &flexbusConfig); /* flexBus initialization ARINC429 device */
return;
}

after this we are trying to write to the 0x62000000U address but the chip select is not generating .

Thank you 

Best regards 

Maheshwar.

Outcomes