Author |
Message |
Topic: Sleep mode for PIC 24HJ64GP504 |
123_CCS
Replies: 23
Views: 45620
|
Forum: General CCS C Discussion Posted: Mon Oct 23, 2017 7:36 am Subject: Sleep mode for PIC 24HJ64GP504 |
Have you set the CAN module to disable/sleep mode first?
I have tried
CAN_OP_LISTEN
CAN_OP_DISABLE
CAN_OP_CONFIG
like this:
can_set_mode(CAN_OP_DISABLE);
sleep();
... |
Topic: Sleep mode for PIC 24HJ64GP504 |
123_CCS
Replies: 23
Views: 45620
|
Forum: General CCS C Discussion Posted: Mon Oct 23, 2017 4:02 am Subject: Sleep mode for PIC 24HJ64GP504 |
-Tried with real CAN device which is trying to send data.
-Measured if the receive pin of the microcontroller changes when making the canbus dominant. This is okay.
-Did read back if the:
C1INTE. ... |
Topic: Sleep mode for PIC 24HJ64GP504 |
123_CCS
Replies: 23
Views: 45620
|
Forum: General CCS C Discussion Posted: Thu Oct 19, 2017 7:44 am Subject: Sleep mode for PIC 24HJ64GP504 |
I thought the CANbus would wake-up when there is a puls on the RXD pin. So that assumption is not correct?
I also did read this:
CiINTE: ECAN Interrupt Enable Register
This register selectively ... |
Topic: Sleep mode for PIC 24HJ64GP504 |
123_CCS
Replies: 23
Views: 45620
|
Forum: General CCS C Discussion Posted: Thu Oct 19, 2017 6:28 am Subject: Sleep mode for PIC 24HJ64GP504 |
OK. Yes if the delta V between the lines is <0.6v this is the recessive state.
You don't show what is in front of this code?. You do realise you have to switch to config mode _before_ you can sw ... |
Topic: Sleep mode for PIC 24HJ64GP504 |
123_CCS
Replies: 23
Views: 45620
|
Forum: General CCS C Discussion Posted: Thu Oct 19, 2017 3:21 am Subject: Sleep mode for PIC 24HJ64GP504 |
Is the bus idle?.
It'll only go into disable mode after 11 recessive bits on the bus.
If the REQOP<2:0> bits (CiCTRL1<10:8>) = 001, the
module enters the Module Disable mode. If ... |
Topic: Sleep mode for PIC 24HJ64GP504 |
123_CCS
Replies: 23
Views: 45620
|
Forum: General CCS C Discussion Posted: Thu Oct 19, 2017 2:35 am Subject: Sleep mode for PIC 24HJ64GP504 |
On CAN, you have to put the module into 'disable' mode, and then when you go to sleep the module automatically goes into recessive mode on the bus. When there is bus activity, this triggers the CAN wa ... |
Topic: Sleep mode for PIC 24HJ64GP504 |
123_CCS
Replies: 23
Views: 45620
|
Forum: General CCS C Discussion Posted: Mon Oct 16, 2017 6:39 am Subject: Sleep mode for PIC 24HJ64GP504 |
You should be able to use the same trick to monitor the CAN data line and wake up on message. You need to configure the CAN RX data pin to be an external interrupt during sleep and reconfigure it to b ... |
Topic: Sleep mode for PIC 24HJ64GP504 |
123_CCS
Replies: 23
Views: 45620
|
Forum: General CCS C Discussion Posted: Thu Oct 12, 2017 2:50 am Subject: Sleep mode for PIC 24HJ64GP504 |
The example for this is ex_cni.c
This is the input change peripheral. Nothing to do with INT_EXT.
They show how to map the peripheral to up to three pins at the same time (so it'd trigger on any ... |
Topic: Sleep mode for PIC 24HJ64GP504 |
123_CCS
Replies: 23
Views: 45620
|
Forum: General CCS C Discussion Posted: Thu Oct 05, 2017 6:36 am Subject: Sleep mode for PIC 24HJ64GP504 |
Thank you all for the help so far,
It is allowed for the CAN-bus to take some time.
I started with the push button. I have got a test board with a 24HJ128GP502.
I get the idea the code needs ... |
Topic: Sleep mode for PIC 24HJ64GP504 |
123_CCS
Replies: 23
Views: 45620
|
Forum: General CCS C Discussion Posted: Mon Oct 02, 2017 9:20 am Subject: Sleep mode for PIC 24HJ64GP504 |
Hello,
I want to make use of the sleep mode.
When a Pin is made high (RC5 pin38) the uC must wake up .
When there is can-bus traffic the uc must also wake up.
Can some one please tell me what to ... |
|