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.

AM263P4-Q1: SENT/SPC Decoder Implementation

Part Number: AM263P4-Q1
Other Parts Discussed in Thread: SYSCONFIG, AM263P4

Tool/software:

Hi,

I have got a general question on the best approach for my problem using the AM263P4-Q1 with up to three SENT/SPC decoder interfaces.

So for now I want to implement two triggered SENT channels (->SPC) in the future a third pure SENT channel might be added.

I found two sample project on SENT decoder for the AM263x in the SDK 10_02_00_13, which I guess could be used for AM263Px as well:

1. Using both PRU cores to sample and decode SENT.

2. Using one PRU and an ECAP module to do the same.

Now, both solutions will result of the implementation of 1 SENT channel, where I will need at least two in parallel, thus from my understanding exceeding the available resources, since there is only one ECAP module available for the PRUs. 

The best approach I have now, is to use the CONTROLSS ECAP modules for sampling, the EDMA for data transfer and the R5F for decoding, even though it is more resource intensive on the R5F compared to the solutions of using the PRU.

Am I missing some better solution and if not, is there sample code available for my approach?

Best regards

Norbert

  • Norbert

    Now, both solutions will result of the implementation of 1 SENT channel, where I will need at least two in parallel, thus from my understanding exceeding the available resources, since there is only one ECAP module available for the PRUs. 

    We support up to 8 channels with the 2x PRU based example and 6 channels with 1x PRU + ECAP based example. Please check following pages in SDK documentation.

    AM263x MCU+ SDK: SENT

    AM263x MCU+ SDK: SENT Decoder Example

    AM263x MCU+ SDK: SENT Decoder Using PRUICSS IEP ECAP Example

    Regards

    Dhaval

  • Hi Dhaval,

    thanks a lot, I was not aware of this multichannel potential.

    Can these example projects be used with the AM263Px CC EVM as well?

    Best regards

    Norbert

  • Norbert

    We plan to make this available in next MCU+ SDK for AM263Px.

    But given that AM263Px and AM263x are pin compatible, you can try porting and running. It should work. We can support if there are any problems.

    Regards

    Dhaval

  • Hi Dhaval,

    I am trying to port the project (MCU_PLUS_SDK_AM263x_11_00_00_19/examples/pru_io/sent/decoder_pruicss_iep_ecap) to the AM263Px.

    I am using
    CSS 20.3.0.14__1.9.0,
    sysconfig_1.25.0, 
    CGT Clang 4.0.3 LTS,
    CGT PRU 2.3.3.

    Steps done so far:

    1. I created a new empty project for the AM263P4.
    2. Copied and replaced the source files from MCU_PLUS_SDK_AM263x_11_00_00_19/examples/pru_io/sent/decoder_pruicss_iep_ecap (except pru firmware) to the new project.
    3. In the sysconfig I replaced to device settings to via texteditor to AM263Px/4.
    4. I can compile and flash the project.
    5. When I also copy the firmware (subfolder /firmware) I am not able to compile the main.asm, since basically every line is invalid:

    I guess the PRU CGT is not setup correctly somehow and I am currently stuck and not sure how to proceed here. There are several points I am not quite certain with:

    1. Was the overall approach of porting feasible?
    2. How to work with the PRU firmware (I'm working through AM263x MCU+ SDK: PRU IO) at the moment, but can't find the mistake yet
    3. Is the PRU firmware automatically complied with the start of the normal build process? Do I have to specifiy the compiler somewhere?

    Best regards

    Norbert

  • Norbert

    PRU project creates .h as output, which is used by R5F project to load into PRU instruction memory. You can copy the .h file from AM263x SDK and use it as it is, unless you want to make modifications to PRU firmware. 

    We can help you in debugging why this build may not be working. I am suspecting that include options and symbol definitions may be missing. Can you ensure that all the project configurations from AM263Px are copied?

    Regards

    Dhaval

  • Hi Dhaval,

    can you name which exact .h file you are referencing?

    Also, one related questions: In my understanding, every IO Pin can be mapped to the PRU and PRU-ECAP module, is that correct? Or are there limits?

    For the CONTROLSS ECAP every IO pin can be used as well, correct?

    Best regards

    Norbert

  • Hi Norbert,

    you need to add header.inc to PRU project to resolve build error, you can find header.inc in examples\pru_io\sent\decoder_pruicss_iep_ecap\firmware\pru0

    But if you not making any modifications in firmware then you can reuse the existing firmware header's itself as dhaval mentioned.

    can you name which exact .h file you are referencing?

    see below image, based on sent encoder PRU Firmware header file is used and loaded into IRAM of PRU by R5F.

    In my understanding, every IO Pin can be mapped to the PRU and PRU-ECAP module, is that correct? Or are there limits?

    you can correct, below is the mapping 

    Any 6 SOC GPIO's  --> GPIO XBAR --> TIME SYNC XBAR --> PRU ECAP module ( CAP 0 to CAP 5)

    Note : Firmware doesn't require any changes when change GPIO signals