Forum Replies Created

Viewing 15 posts - 16 through 30 (of 31 total)
  • Author
    Posts
  • ConnorConnor
    Keymaster
    Post count: 31

    Hello Kantesh,

    Please find the attached steps below:

    1. Set “EN_Can4” high
    2. Toggle “CAN4_STB” to high then low.
    3. toggle EN_Lin high then low.

    Give every step at least 100 ms.

    This step will disable CAN Wake. Let me know for any further queries.

    Thanks
    Sandeep

    ConnorConnor
    Keymaster
    Post count: 31

    Hi,

    Thanks for reaching out to us.

    We will test the steps and get back to you with a solution as soon as possible.

    ConnorConnor
    Keymaster
    Post count: 31

    Hi Kantesh,

    Some questions about your setup:

    – Are you using Matlab/Simulink or S32DS to program the algo?
    – Are you capturing your CAN messages in polling or interrupt mode?
    – If you are using multiple capture modes, are there different message buffers that are more prone to problems?

    ConnorConnor
    Keymaster
    Post count: 31

    Is the application for algorithm calibration? Are you programming in Matlab/Simulink or C?

    ConnorConnor
    Keymaster
    Post count: 31

    Please provide more details on which hardware you are using and the intended application.

    – What linker are you referring to? The custom linker from FlexCaseFlash?
    – For clock setups and other peripheral initialization, your best bet is to open one of the sample projects provided by NXP and modify for your needs.
    – Internal pin mappings are in the datasheets, but if you let me know what hardware you’re using I can double check that the information is present in the datasheet

    ConnorConnor
    Keymaster
    Post count: 31

    Hello,

    This feature is in the works. Can you please let me know some for details of the application for using Freemaster over CAN?

    ConnorConnor
    Keymaster
    Post count: 31

    We do not currently have a guide for NVM access, but it is in our queue. I will reply in this thread with a link to the tutorial when it is ready. Thank you for your patience.

    ConnorConnor
    Keymaster
    Post count: 31

    Hi Nikhil,

    NVM access is not something that is supported automatically in Simulink. Getting it to work properly would be a combination of linker changes like the ones that are done for the CAN flasher, and some “System Update” blocks to inject C functions into the code. Is your use case storing calibration values?

    ConnorConnor
    Keymaster
    Post count: 31

    Hello,

    The bootloader binaries are not available by default. We will be adding bootloader binaries for specific versions of the CAN flasher soon. For your version of the FlexCase, you can indeed use your Pemicro tool.

    ConnorConnor
    Keymaster
    Post count: 31

    Please see attached files. The python tutorial also mentions setting up scripts to run at startup, which you can apply to “spiComm.py” after verifying that it runs standalone. The “spiLogger.py” can be run as needed while spiComm is running. You will also need to add the following line to /boot/config.txt to make the SPI interface available:

    dtoverlay=spi0-2cs

    • This reply was modified 1 year, 6 months ago by ConnorConnor.
    Attachments:
    You must be logged in to view attached files.
    ConnorConnor
    Keymaster
    Post count: 31

    Hi Amin,

    Is this variable that you use to trigger a CAN message coming from another peripheral or are you just setting it in FreeMaster? If it is a boolean variable, you can construct a “rising edge detect” by triggering the subsystem when the current value is 1 and the current value is different from the previous.

    For the CAN message not changing, try to construct your CAN message in a similar way to how the default SPI communication works: individual variables merged into an array and passed to the CAN send block. Sometimes trying to edit an entire array through FreeMaster can add unnecessary complication.

    ConnorConnor
    Keymaster
    Post count: 31

    “RCM->RPC = 0x1002” Is a stability improvement that prevents large inducive spikes from erroneously affecting the MCU reset circuit. It is good to have in general, but unrelated to this issue. The LPSPI1 register settings in the “Exit” section of the System Start Block are the relevant ones.

    On a FCS1.1 with CM4, the end of the boot config should look like this:

    gpio=4=op,pd,dl
    gpio=45=pu
    dtoverlay=spi1-3cs
    dtoverlay=spi0-2cs
    dtoverlay=dwc2,dr_mode=host

    For FCS1.2 with CM4:

    gpio=20=op,pd,dl
    dtoverlay=spi0-2cs
    dtoverlay=dwc2,dr_mode=host

    • This reply was modified 1 year, 8 months ago by ConnorConnor.
    ConnorConnor
    Keymaster
    Post count: 31

    A couple things to try:

    On the MCU side, see if temporarily disabling MCU<>MPU SPI helps, which can narrow down the problem. You can check to make sure that the MCU SPI tristates are set to floating when not transmitting, which will help with interference with other SPI devices on the same bus. The current MCU samples have the tristate setting code in the “System Start” block in the “Hardware Modules Config” subsystem.

    On the MPU side, make sure you’re comparing the CM4s on the same FlexCase to isolate the problem to the CM4. Assuming the two CM4s have different behavior on the same FlexCase, double check that /boot/config.txt has the same GPIO/SPI settings for both CM4s, and try the updated Python script in the ADC guide (checks all channels, may have to change the bus index if using FlexCase 1.1).

    ConnorConnor
    Keymaster
    Post count: 31

    By default, we ship the MCU CAN without resistors, and we ship the CM4 adapter CAN with resistors, but there is some variation in both depending on customer requests. To be sure, a multimeter will confirm if the 120ohm resistance is present across the CAN pins.

    If desired for your application, we can also post instructions on how to de-populate or re-populate the internal resistors yourself, keeping in mind that this modification will void the warranty. It is generally recommended to build termination into the wire harness instead of on the devices unless the network layout is simple (short distance, 2-3 devices).

    ConnorConnor
    Keymaster
    Post count: 31

    For motor control, you can use the PWM output block (FTM PWM Config) to control the effective voltage level going through the motor. The duty cycle inputs (0.0-1.0) indicates what percentage of the time the output is activated. If you only need one speed for the motor, you can also use the regular output block (GPO Write). In the DIO tutorial, the first PWM output is switching the pin between floating and ground, and so the digital input it is connected to can read two different levels.

    Is the diagnostic buzzer not working in the DIO example specifically? Have you verified that the buzzer works with the MCU software that was on the board by default?

    Attachments:
    You must be logged in to view attached files.
Viewing 15 posts - 16 through 30 (of 31 total)