Wake-up function

Programmable 6-channel router and data logger for CAN and CAN FD with I/O and optional Ethernet interface
Post Reply
IfF_Member
Posts: 6
Joined: Tue 27. Feb 2024, 11:00

Wake-up function

Post by IfF_Member » Thu 29. Feb 2024, 14:46

Hello,
I have a question regarding the Wake-up function and its functionality. I am using a standard PCAN-Router Pro FD and standard transceiver modules (PCAN-Transceiver TJA1043) and connected PIN 2 to terminal 30 (always plus) and PIN 1 to terminal 15 (ignitation on), similar to what is suggested in "3.2 Starting the Device" of the manual.
What I want to achieve is, that as soon as the car is turned on (power at PIN 1), the router is woken up and if the car is tunred off (no power at PIN 1), the rooter will shut down.
I also found the function "HW_EnterPowerDown" but i am unsure on how to use it, since it is stated in the comments that it requries PIN 1 to be disconnected.

I would be grateful, if you could to achieve my goal or point me in the right direction with the code exaamples.

Kind regards,
Henrik

G.Lang
Support
Support
Posts: 169
Joined: Wed 22. Sep 2010, 14:58

Re: Wake-up function

Post by G.Lang » Fri 1. Mar 2024, 12:37

Dear Henrik,

do you use an own firmware or the routers standard logger firmware? If you use the standard firmware than, generally you can choose between 3 options to power down the device., please take a look inside the config.txt

***********************************************************************************************************************
// Timeout in milliseconds to stop tracing after the CAN traffic has stopped. Default is disabled.
// Use 0 to disable timeout.
// Use !N from 1 to 4000000000 to enable timeout. If '!' was added module will shut down.
TRC_STOP_TRAFFIC_TO=0


// Timeout in milliseconds to stop tracing on terminal 15 loss. Default is disabled.
// Terminal 15 is Wake-up / pin 1 of the power connector.
// Use 0 to disable timeout.
// Use !N from 1 to 4000000000 to enable timeout. If '!' was added module will shut down.
TRC_STOP_T15_TO=0


// Timeout in milliseconds to stop tracing on main power loss. Default is disabled.
// This will need an installed Li-Ion back-up battery cell!
// Use 0 to disable timeout.
// Use !N from 1 to 4000000000 to enable timeout. If '!' was added module will shut down.
TRC_STOP_MAINPOW_TO=!5000

***********************************************************************************************************************

IfF_Member
Posts: 6
Joined: Tue 27. Feb 2024, 11:00

Re: Wake-up function

Post by IfF_Member » Mon 4. Mar 2024, 09:11

I am currently trying to modify the example "01_Routing" in order to route data traffic between the can ports 1 - 4 and block specific messages.
From what I understand by reading the manual the config.txt is only usable in the default setting (only for data recording). So it wouldnt be applicable for me.
Are there any other possibilities I can try?

User avatar
PEAK-Support
Sales & Support
Sales & Support
Posts: 1646
Joined: Fri 10. Sep 2010, 19:34

Re: Wake-up function

Post by PEAK-Support » Mon 4. Mar 2024, 09:49

Please do not MIX up the Standard Firmware, that we deliver with the Unit (Logger Firmware - that could be configure by a config.txt file), and a own developed Firmware.
You could not "mix" different Firmware. Once you have flashed a own firmware, the config.txt file, stored on the internal eMMC, is no longer used.
You always could flash back our Standard Firmware - this is no problem.

If you want to use the sample "01_Routing" for your project (which is the best to start for the solution you are looking for), download the ARM-Developer Package, install and setup the Environment (VS-Code, run the VB Scripts))
and spend some time to understand the Sample code. It is very simply to add CAN Filters, change forwarding IDs etc. if you have a basic knowledge in C/C++ µC Development.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------

IfF_Member
Posts: 6
Joined: Tue 27. Feb 2024, 11:00

Re: Wake-up function

Post by IfF_Member » Mon 4. Mar 2024, 10:16

I am already working with the sample code, which is why I was asking what the appropriate way of using "HW_EnterPowerDown" is and if there is a way to power the system up again.
Or if I could achieve the wake up function simply by monitoring the the bus or voltage on PIN 1. Since it is stated that the tranceiver module has a wake-up function.

But if i understand you correct, the wake-up function of PIN1 and of the transceiver module can only be used if the default firmware is used? So there is no way of using the wake-up function when using a customized firmware?

User avatar
PEAK-Support
Sales & Support
Sales & Support
Posts: 1646
Joined: Fri 10. Sep 2010, 19:34

Re: Wake-up function

Post by PEAK-Support » Mon 4. Mar 2024, 10:24

You could definitely also use all the Sleep and Wake Up functionality in your own code. The Logger Code was also written with our API. All is possible in your own code as well.
We could send you a sample project if you contact us at support[at]peak-system.com, including your company information and the serial number of the used Device.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------

IfF_Member
Posts: 6
Joined: Tue 27. Feb 2024, 11:00

Re: Wake-up function

Post by IfF_Member » Mon 4. Mar 2024, 10:44

I have send an e-mail with the subject "Forum Thread "Wake-up function"". I hope it contains all information you need.

User avatar
PEAK-Support
Sales & Support
Sales & Support
Posts: 1646
Joined: Fri 10. Sep 2010, 19:34

Re: Wake-up function

Post by PEAK-Support » Mon 4. Mar 2024, 10:45

i already send out the sample code.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------

Post Reply