Power-down

Universal Programmable Converter for CAN FD and CAN
Post Reply
matli
Posts: 5
Joined: Thu 2. Apr 2020, 10:21

Power-down

Post by matli » Thu 2. Apr 2020, 10:45

I would like to power-down my PCAN-Router FD (for later wake-up by CAN). I tried the example in C_POWER_STATES, but I don't get it to work. The only thing that happens when I send the 0x45D message is that the device gets stuck in the while(1)-loop, maintaining the same power consumption as before the HW_EnterPowerDown()-call. Are there some more requirements for this to work that I am not aware of?

M.Heidemann
Sales & Support
Sales & Support
Posts: 290
Joined: Fri 20. Sep 2019, 13:31

Re: Power-down

Post by M.Heidemann » Thu 2. Apr 2020, 11:27

Hello,

Can you tell me the serial number of your PCAN-Router FD?

Best Regards

Marvin

matli
Posts: 5
Joined: Thu 2. Apr 2020, 10:21

Re: Power-down

Post by matli » Thu 2. Apr 2020, 12:41

The serial is IPEH-00221404268

M.Heidemann
Sales & Support
Sales & Support
Posts: 290
Joined: Fri 20. Sep 2019, 13:31

Re: Power-down

Post by M.Heidemann » Thu 2. Apr 2020, 13:03

Hello,

You have an earlier hardware revision of the PCAN-Router FD, that does not have this feature.

Please see this news-article on our website regarding this:

https://www.peak-system.com/Details.114 ... .html?&L=1

There is also a hint to this in the comments of the code itself:
See PCAN-Router FD user manual for wake-up
// capability (depends on HW version / serial number).
Best Regards

Marvin Heidemann

matli
Posts: 5
Joined: Thu 2. Apr 2020, 10:21

Re: Power-down

Post by matli » Thu 2. Apr 2020, 14:32

Ah, OK, thanks for that clarification. So the feature is available in all black versions, and not in any of the older versions?

M.Heidemann
Sales & Support
Sales & Support
Posts: 290
Joined: Fri 20. Sep 2019, 13:31

Re: Power-down

Post by M.Heidemann » Thu 2. Apr 2020, 14:50

Hello,

Exactly. This feature was added to our latest hardware revision of the PCAN-Router FD (Black housing):

PCAN-Router FD 2 D-Sub connectors IPEH-002214 from SN 10000
PCAN-Router FD Screw terminal strip (Phoenix) IPEH-002215 from SN 1000

Best Regards

Marvin

matli
Posts: 5
Joined: Thu 2. Apr 2020, 10:21

Re: Power-down

Post by matli » Mon 19. Oct 2020, 10:37

Hello,

yes it seems to work perfectly fine with the new version.

Is there any way to find out from the software which hardware version the software is running on? It would be convenient to be able to use the same software in old and new hardware versions, but only enable the power-down functionality if it is available.

//Mattias

M.Heidemann
Sales & Support
Sales & Support
Posts: 290
Joined: Fri 20. Sep 2019, 13:31

Re: Power-down

Post by M.Heidemann » Mon 19. Oct 2020, 16:41

Hello,

i have forwarded this request to our development-team, as soo as i got any info,
i'll report them back to you.

Best Regards

Marvin

M.Heidemann
Sales & Support
Sales & Support
Posts: 290
Joined: Fri 20. Sep 2019, 13:31

Re: Power-down

Post by M.Heidemann » Thu 22. Oct 2020, 16:31

Hello mattias,

Our development team fowarded me the following information.

You can this function to determine the hardware-version

Code: Select all


#include "ARMCM4_FP.h"
#include "lpc407x_8x_177x_8x.h"



// read hardware version from solder pins
static uint8_t  HW_GetHwVersion ( void)
{
    uint8_t  hw_version;


    // from pins
    hw_version = LPC_GPIO2->PIN >> 4;
    hw_version &= 0x7;

    if ( LPC_GPIO2->PIN & ( 1 << 16))
    {
        // move pin 16 to bit 3
        hw_version |= 1 << 3;
    }

    hw_version ^= 0xF;

    if ( hw_version)
    {
        hw_version += 5;
    }


    if ( hw_version == 0)
    {
        // hw-version is 1 to 3, only mods for EMI
        return 1U;
    }

    else if ( hw_version == 12U)
    {
        // hw-version is 4 and 5, added support for wake-up, mechanical mods
        return 4U;
    }

    // hw-version is:
    // 6 final version for wake-up, footprint mods, supply path mods
    return hw_version;
}

In this case you can use the wake-up functionality in case you get the return of "4U" (As seen in the code).

For further questions feel free to contact me again.

Best Regards

Marvin

matli
Posts: 5
Joined: Thu 2. Apr 2020, 10:21

Re: Power-down

Post by matli » Fri 23. Oct 2020, 09:36

That's great. Thanks a lot!

Post Reply