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.

CC1310 - Question about Hex values in SCIF.C's pScifTaskDataStructInfoLut[]



Hello,

I had a question about the hex value found in  pScifTaskDataStructInfoLut[].

The files excerpt is as follows:

/** \brief Look-up table of data structure information for each task
  *
  * There is one entry per data structure (\c cfg, \c input, \c output and \c state) per task:
  * - [31:24] Data structure size (number of 16-bit words)
  * - [23:16] Buffer count (when 2+, first data structure is preceded by buffering control variables)
  * - [15:0] Address of the first data structure
  */
static const uint32_t pScifTaskDataStructInfoLut[] = {
//  cfg         input       output      state       
    0x00000000, 0x00000000, 0x018010E6, 0x00201116  // SHT31 IAQCoreP
};

This means that my output data is only one 16-bit word that has a buffer count of 128? Why is this the case?
Shouldn't the my data struct be bigger? Also why are there 128 buffers? Is that automatically generated by SCS?

Below is my output data struct from scif.h

/// SHT31 IAQCoreP: Task output data structure
typedef struct {
    uint16_t co2Value[3];            ///< CO2 value in ppm from iAQ
    uint16_t humidity[3];            ///< humidity reading from SHT31
    uint16_t iaqStatusByte[3];       ///< status_byte from iAQ
    uint16_t resistanceValueHigh[3]; ///< most significant 8bits of resistance_value from iAQ
    uint16_t resistanceValueLow[3];  ///< least significant 16bits of resistance_value from iAQ
    uint16_t sht31Status[3];         ///< 0 for ok, 1 for error
    uint16_t temperature[3];         ///< temp readings from SHT31
    uint16_t vocValue[3];            ///< T_VOC_value from iAQ
} SCIF_SHT31_IAQCORE_P_OUTPUT_T;

Also since my data is contained in more than one buffer does have any implication on how I access the data on the OS side?

I have a very simple application. I'll have a semaphore that has my tirtos task to wait until the sensor controller task finished, OS processes and transmits the data, and the system switches itself off.  

Thanks for your help,
Joseph

  • Hi Joseph,

    Joey V said:
    This means that my output data is only one 16-bit word that has a buffer count of 128? Why is this the case?
    Shouldn't the my data struct be bigger? Also why are there 128 buffers? Is that automatically generated by SCS?

    This number is automatically generated by SCS. You could try to change the size of the arrays and you should see that this number changes.

    Also, I don't know whether it's a coincidence, but 0x0180 (the MSB portion of the size) makes 384. This is the size of your SCIF_SHT31_IAQCORE_P_OUTPUT_T structure in bits.

    Joey V said:
    Also since my data is contained in more than one buffer does have any implication on how I access the data on the OS side?

    It doesn't have any implications, since the data in the structure will be contiguous so you only need the start address of your data.

    If you're not sure, just test it out.

    Regards,

    Michel