This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/RM46L852: MibSPI examples

Part Number: RM46L852
Other Parts Discussed in Thread: HALCOGEN

Tool/software: Code Composer Studio

Looking for examples to use MibSPI halcogen drivers.  The halcogen demos examples are a bit simple. 

I have to control several (6-devices) SPI ADC (AD7928B) using one mibspi port .. I'll like to use the halcogen built in driver as much as possible to control this devices. 

I have done standard spi before but I noticed this is a bit different.  signal enables seem to be build-in into halcogen driver.  not sure how to assign pins to GPIO pins or if there is a specific way in which the devices need to be interface in order to use the driver.  

  • Hello,

    Both MibSPI1 and MibSPI3 have 6 CS pins to support 6 slaves. We don't any comprehensive example for MibSPI. But I posted several MibSPI examples for MibSPI + DAM.

    The function in HALCoGen generated MibSPI driver: mibspiSetFunctional(mibspiBASE_t *mibspi, uint32 port) can be used to Change functional behavior of pins at runtime. Change the value of the PC0 register at runtime, this allows to dynamically change the functionality of the MIBSPI pins between functional and GIO mode.

    For example:

  • Thanks QJ, 

    In my application, I have 6 ADC converters. I'm using a demux to enable each of the IC's...  therefore if my thinking is correct, I can use the Mipspi up to 6 groups to control communications (polling mode).. that way control all devices simultaneously. 

    I think that I'm not supposed to use a demux correct ?  .. I'm supposed to use the 5 pins allocated "MIBSPI3NCS[0] -[5]"  or do you know if halcogen can be configure to make it aware of my configuration ?

    Lastly, can you please point to the examples you mentioned. I'm assuming this are different than the halcogen's tutorial.

     

  • Hello,

    You can 6 chipselets to control 6 ADC devices. You can access one device at a time by enabling the chipselect.

    Yes, the 6 chipselect signals can be configured as SPI CS or as GPIO. In HALCoGen, use MibSPI3->MibSPI Port to select the pin mode (SPI or GIO).