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.

  • TI Thinks Resolved

RM48L940: Enabling Parity Test on SafeTI Library

Intellectual 600 points

Replies: 4

Views: 111

Part Number: RM48L940

How do I enable parity check for ADC and other peripherals so that this test passes?

    /* If ADC parity check is not enabled, return error. */
     if((testType == ADC_SRAM_PARITY_TEST) &&
       ((ADC_PAR_DIS) == BF_GET(config->adcbase->PARCR, ADC_PARCR_PAR_START, ADC_PARCR_PAR_LENGTH)))
     {
         SL_Log_Error(FUNC_ID_ST_ADC, ERR_TYPE_ENTRY_CON, 4u);
         return(FALSE);
     }

I already tried to the set the PARCR like this:

sl_adcREG1->PARCR = 0x10Au;

but that doesn't help. Is there an API for doing this?

  • Specifically, with
    sl_adcREG1->PARCR = 0x10Au;
    I get a compile error for unexpected token. I hope someone can chime in soon. Thanks.
  • In reply to Guy Tadi:

    Hello,
    Did you check the value of ADPARCR register whether PARITY_ENA bits are 0x10 or they are still 0x5. Writing to ADPAPCR is allowed only in privileged mode.

    Best regards,
    Miro

    Best regards,
    Miro

  • In reply to Miro:

    Thanks. I checked and PARCR is 0x5. How exactly do I set this when using the safety library API? As I noted, I get a compile error if I try to set it with sl_adcREG1->PARCR = 0x10Au (error is "unrecognized token"). How do I reference the PARCR register so that I can set it?
  • In reply to Guy Tadi:

    Hello,
    Writing to ADPAPCR is allowed only in privileged mode (e2e.ti.com/.../343714).

    Best regards,
    Miro

    Best regards,
    Miro

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.