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.

DCAN Pullup/Pulldown Configuration creates error in halcogen

Other Parts Discussed in Thread: HALCOGEN

Hello

How do I have to configure the TX/RX Pin when I use the DCAN Module in CAN Mode. When I use a Pullup on RX and TX Pin Halcogen creates an error:

DRIVER.CAN.VAR.CAN_1_PORT_RX_PSL=2

error: value invalid for variable: CAN.CAN_1_PORT_RX_PSL.VALUE

DRIVER.CAN.VAR.CAN_1_PORT_TX_PSL=4

error: value invalid for variable: CAN.CAN_1_PORT_TX_PSL.VALUE

 

This error message shows up when i reload the saved project.

 

Regards

Fabian

 

  • Fabian,

    I have forwarded your question to the HALCogen team. They will provide an answer to you shortly.

    Thanks and regards,

    Zhaohong

  • Hi Fabian

    Which Device and HALCoGen version are you using?

    Could you please share the HALCoGen Project files ( .dil and .hcg) . 

    Regards

    Veena

  • Hi Veena

    I'm using halcogen v03.04.00 the selected device is the RM48L950PGE (because my actual controller the RM48L952-PGET is unavailabe in halcogen).

    Here the .hcg and .dil file:

    5618.CanPullUpError.zip

    Regards Fabian

  • Hi Fabian,

    Sorry for the inconvinence, This bug has be already committed and fixed for 3.05.00, Which should be out by 3rd week of March 2013.

    As a workaround please ignore the error in HALCoGen and do the following change in the generated code.

         /** - CAN1 Port output values */
        canREG1->TIOC = (4U  << 18U )  Replace with  (1U  << 18U )
                       | (0U  << 17U )  
                       | (1U  << 3U ) 
                       | (0U  << 2U )   
                       | (0U << 1U ) 
                       | (0U  );    
        canREG1->RIOC = (2U  << 18U ) Replace with  (1U  << 18U )  
                       | (0U  << 17U )  
                       | (1U  << 3U ) 
                       | (0U  << 2U )
                       | (0U <<1U ) 
                       | (0U  ); 

    Regards
    Prathap