Page 1 of 2

Power-down

Posted: Thu 2. Apr 2020, 10:45
by matli
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?

Re: Power-down

Posted: Thu 2. Apr 2020, 11:27
by M.Heidemann
Hello,

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

Best Regards

Marvin

Re: Power-down

Posted: Thu 2. Apr 2020, 12:41
by matli
The serial is IPEH-00221404268

Re: Power-down

Posted: Thu 2. Apr 2020, 13:03
by M.Heidemann
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

Re: Power-down

Posted: Thu 2. Apr 2020, 14:32
by matli
Ah, OK, thanks for that clarification. So the feature is available in all black versions, and not in any of the older versions?

Re: Power-down

Posted: Thu 2. Apr 2020, 14:50
by M.Heidemann
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

Re: Power-down

Posted: Mon 19. Oct 2020, 10:37
by matli
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

Re: Power-down

Posted: Mon 19. Oct 2020, 16:41
by M.Heidemann
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

Re: Power-down

Posted: Thu 22. Oct 2020, 16:31
by M.Heidemann
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

Re: Power-down

Posted: Fri 23. Oct 2020, 09:36
by matli
That's great. Thanks a lot!