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.

RM46 Lin/Sci2 GIO

Other Parts Discussed in Thread: HALCOGEN, RM46L852

Hello,

I am working on the RM46L852, and I am trying to configure the LIN/SCI2 as a gio. I used HALCOGEN to generate the driver code, using the RX (pin 2) and TX (pin 4) pins as gio, and I have tried using both the SCI2 (scilinPORT) and LIN (linPORT) with the matching  HALCOGEN settings, but the hacogen generated gioSetBit() function doesn't seem to correctly change the value (it works for every gio port but lin/sci2).

I have been able to change the TX pin by directly referencing scilinREG->PIO3, but it would be better with my current project if I can use gioSetBit(). My question is whether the gioSetBit works for the scilinPORT and/or linPORT gio ports on the RM46L852, or will I have to directly reference scilinREG and/or linREG to change the gio?

Thank you,

Sean

  • Hi Sean,


    You are looking in the right place.

    Please confirm that on the "Driver Enable' tab you have SCI2 checked an not LIN. This tab is under 'RM46L852..."

    Then on the SCI2 tab, check the SCI/LIN port tab to make sure that you have the GIO mode selected for these pins not the SCI mode.

    And if you want the pin to be an output by default you need to check the 'DIR' box.  Otherwise you need to set the DIR bit in software.

    When you call the GIO functions pass scilinPORT as the gioPORT_t * parameter.

    Use the values from sciPinSelect enum in sci.h to get the correct bit position in the register for each pin.


     

  • Im having the same problem.... but with a small difference. The TX is working but the RX is not...

    Here is how I configure the LIN port

    I even tried to change the value here, it did, but I cannot drive it to low...

    Update:

    I already check (again) the memory browser and gave me this:

    and here is the lin.c code Halcogen generate

    as you can see, the PIO0 is configured as non functional, so I can use the pins as GIO, the PIO3 has the output values on low, the direction for both pins (Rx and TX) are output and the open drain is disable and the pull up resistance is selected but (I dont finish to understand the memory broser to be honest) it seem that the code and the memory browser dont match...

    Any idea??

    thanks for the help