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.

I/O Pins, BUS and embedded WiFi module communications

Other Parts Discussed in Thread: CC3200

Hi all,


I want to ask informations about CC3200 pins GPIO. I've read in datasheed that there is 2 registers GPIODIR and GPIODATA, each record of this registers have 8bit informations about pin directions and pin state data.

Since there is 8bit per each port, suppose I'll connect an IC that communicate 8bit samples at very high rate(about 10Mhz). What i need is to read this 8 bit very fast and i can't do that with a common library that require more than 8 clock cycle. What I need is to direct read them with a low code istruction.

What I ask is:

- I'm going to read directly registers of this 8 bit port. But how I do that? I directly read register each clock cycle, or I need to do more operations?(like: Write register and Read register?) So how much minimum clock cycle I will need to read this pins?

- Related to first questions, this register, in case of 8bit input port, is automatically updated each clock or a software commad is need to do that?

- All this operations use MCU processor power or there is an embedded bus controller that can do that while MCU process another operation?

Now, I want to send this data directly to embedded WiFi processor that has the task to send data through WiFi.

- How communication work between embedded MCU and WiFi processor, it's a parallel connection?

- Since WiFi is a serial communication, WiFi processor will shift this data? How max. dimension may have the total amout of data?

- If the connection is parallel of 32bit, to keep less operation as possible, is it possible to write 8bit data in one single 32bit register(or 4 consecutive registers) and after that read and send them via wifi with a single istruction?


Thank you!

  • I cannot answer you question directly, but I instead of answering it, there may be other approaches to solve the same issue. So can you explain what you are attempting to achieve, in other words, can you explain what your application does?

    Glenn.
  • The main goal of my question is to understand how CC3200 works to know which are possible applications and what are max. speeds I can reach with different applications. One may be a data sender station that directly act like a pipe or do a partial elaboration of data form another MCU or multiple MCUs. But I can project more becouse the datasheet didn't answer to my dubt on how internally this product works. Or maybe datasheet answered with references but this required advanced knowledge that i don't have. (or maybe I miss them) That's why I asked here.

    Thanks for any help.

  • Look into DMA, chapter 4, CC3200 TRM, I suspect this may be what you are looking for.

    Glenn

  • There is also some demo code to help you get started in the CC3200 SDK. Loop for uart_dma and udma in the example folder

    Glenn.
  • In this(www.ti.com/lit/ug/swru367b/swru367b.pdf) datasheet of CC3200 I've found on page 120 a description of GPIODATA register.

    A read from GPIODATA returns the last bit value written if the respective pins are configured as outputs,
    or it returns the value on the corresponding input pin when these are configured as inputs.


    But nothing expain how this GPIODATA is updated if we have set GPIO pins as input.

    In APIs i've found:


    long
    GPIOPinRead(unsigned long ulPort, unsigned char ucPins)
    {
    //
    // Check the arguments.
    //
    ASSERT(GPIOBaseValid(ulPort));

    //
    // Return the pin value(s).
    //
    return(HWREG(ulPort + (GPIO_O_GPIO_DATA + (ucPins << 2))));
    }

    Eliminating ASSERT function we have only HWREG(ulPort + (GPIO_O_GPIO_DATA + (ucPins << 2))) that returns us pin values situated in GPIODATA reg.

    My questions are two:
    - How much clock cycle require HWREG? (I presume 2 clock, 1 clock for definition of "volatile unsigned short" and 1 clock to read data)
    - Since we are not going to do write operations on register in this istructions, GPIODATA is automatically updated by fw/hw? So each clock i've GPIODATA input pins register updated?

  • Why not add some code to an application and then use a debugger to see how many clock cycles.
  • I don't have already a CC3200 to try it.