AnsweredAssumed Answered

Flexbus setting up chip selects

Question asked by Ian Norman on Jan 29, 2019
Latest reply on Jan 31, 2019 by Ian Norman

Hi All,

Could someone give me some guidance on how to set up the chip selects for the flexbus? I've managed to get things running using the code from the example as follows 

 

       flexbus_config_t flexbusUserConfig;

 

    /* Get default config */
    /*
     * flexbusUserConfig.writeProtect = 0;
     * flexbusUserConfig.burstWrite = 0;
     * flexbusUserConfig.burstRead = 0;
     * flexbusUserConfig.byteEnableMode = 0;
     * flexbusUserConfig.autoAcknowledge = true;
     * flexbusUserConfig.extendTransferAddress = 0;
     * flexbusUserConfig.secondaryWaitStates = 0;
     * flexbusUserConfig.byteLaneShift = kFLEXBUS_NotShifted;
     * flexbusUserConfig.writeAddressHold = kFLEXBUS_Hold1Cycle;
     * flexbusUserConfig.readAddressHold = kFLEXBUS_Hold1Or0Cycles;
     * flexbusUserConfig.addressSetup = kFLEXBUS_FirstRisingEdge;
     * flexbusUserConfig.portSize = kFLEXBUS_1Byte;
     * flexbusUserConfig.group1MultiplexControl = kFLEXBUS_MultiplexGroup1_FB_ALE;
     * flexbusUserConfig.group2MultiplexControl = kFLEXBUS_MultiplexGroup2_FB_CS4;
     * flexbusUserConfig.group3MultiplexControl = kFLEXBUS_MultiplexGroup3_FB_CS5;
     * flexbusUserConfig.group4MultiplexControl = kFLEXBUS_MultiplexGroup4_FB_TBST;
     * flexbusUserConfig.group5MultiplexControl = kFLEXBUS_MultiplexGroup5_FB_TA;
     */
    FLEXBUS_GetDefaultConfig(&flexbusUserConfig);  //as above
    flexbusUserConfig.chipBaseAddress = 0x60000000U;
    flexbusUserConfig.chipBaseAddressMask = 0x7U;
   
    FLEXBUS_Init(FB, &flexbusUserConfig); 
which is working fine on CS0. If I alter the configuration to the following 
flexbusUserConfig.chipBaseAddress = 0x60000000U;
flexbusUserConfig.chipBaseAddressMask = 0x7U;
flexbusUserConfig.group5MultiplexControl= kFLEXBUS_MultiplexGroup5_FB_CS3;
I still see CS0 toggling instead of CS3.
Chip select 3 has been setup through the pin mux tool to be assigned to the flexbus, and I can see it is set as such in pin_mux.c to  kPORT_MuxAlt5
How should I be setting up the chip selects and memory space?
Kind regards
Ian

Outcomes