Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[not next revision] No wake up with TJA1442AT - 5v CAN power supply #22

Closed
rusefillc opened this issue Jan 17, 2022 · 36 comments · Fixed by rusefi/rusefi#3894
Closed

[not next revision] No wake up with TJA1442AT - 5v CAN power supply #22

rusefillc opened this issue Jan 17, 2022 · 36 comments · Fixed by rusefi/rusefi#3894
Assignees
Labels

Comments

@rusefillc
Copy link
Contributor

rusefillc commented Jan 17, 2022

canRxAdd(0x570)
function onCanRx(bus, id, dlc, data)
	print('got CAN id=' ..id ..' dlc=' ..dlc)
	id11 = id % 2048
	if id11 == 0x570 then
		mcu_standby()
	end
end

I've soldered TJA1442AT on one unit with stm32f407 MCU

I have CAN validated see #16 (comment)

I issue "stm32_standby" via rusEFI console

i send CAN packets

image

expected result: wake up

actual result: no wake up :(

@rusefillc
Copy link
Contributor Author

rusefillc commented Jan 17, 2022

image

image

image

@rusefillc
Copy link
Contributor Author

at the moment we are trying to wake up through op-amp, let's try bypassing manually?

@andreika-git where is a good source of +3v and good poking spot to attempt waking up more manually bypassing op-amps?

@rusefillc
Copy link
Contributor Author

Actually code was not ready rusefi/rusefi@54b70fb

@mck1117
Copy link

mck1117 commented Jan 17, 2022

Should work with opamp

@rusefillc
Copy link
Contributor Author

rusefillc commented Jan 17, 2022

rusefi/rusefi@54b70fb did not help

@andreika-git please advice on test points for jumper wake up test

@rusefillc
Copy link
Contributor Author

Just verified baseline: wake-up via PA0 works on F407 discovery

@rusefillc
Copy link
Contributor Author

Hellen does not wake up with +3 or +5 applied to CAN pin 4 with CAN transceiver removed. I am stuck and out of ideas :(

IMG_20220117_140735

@NMSTEC
Copy link

NMSTEC commented Jan 17, 2022

Either I'm misunderstanding, or you guys are trying to wakeup an F4 via CAN RX. F4 cannot wake via any pin other than PA0, and rising edge.

@rusefillc
Copy link
Contributor Author

This board feeds can_rx into pa0 via op-smp

@NMSTEC
Copy link

NMSTEC commented Jan 17, 2022

My bad, apologies.

@rusefillc
Copy link
Contributor Author

great news! discovery firmware on alphax hardware wake up via 5v on CAN RX pad with transceiver removed!

op-amp divider drama - same discovery firmware on alphax hardware does NOT wake up with 3v on CAN RX pad with transceiver removed!

@rusefillc
Copy link
Contributor Author

with full erase alphax firmware wakes up on 5v, looks like we had some settings drama or maybe I did not flash latest properly

sounds like next step to address op-amp vs 3v drama.

i assume divider would not be easy to remove due to 4-resistor-arrays. do we want to replace 4-resistor-array with three individual resistors or is that a bad track overall?

@andreika-git
Copy link
Collaborator

andreika-git commented Jan 19, 2022

Let's do a little fix:

  1. Find a 510 Ohms 0603 resistor on the Hellen72a board https://rusefi.com/docs/ibom/hellen72a-ibom.html
    "510","R212, R213, R214, R215, R116, R119, R120, R124","R0603"
  2. Solder it over the 0604-x4 here:
    image
    image

@rusefillc
Copy link
Contributor Author

I've removed CAN transceiver for first round of experiments

I've soldered resistor on top of array as recommended

first tests stand by was rebooting right away, got that a couple of time

took stuff back for inspection / poking, solder looked good

did more tests and behavior changed, in a good way I guess

it goes to sleep into standby and wakes up with just an antenna - i touch CAN RX pad with jumper wire and that wakes MCU up, even with jumper wire floating

@rusefillc
Copy link
Contributor Author

i went forward and re-install can transceiver

now it again reboots after standby right away :(

@andreika-git
Copy link
Collaborator

  1. boardPrepareForStop() has palEnableLineEvent() but boardPrepareForStandby() does not
  2. PAL_EVENT_MODE_RISING_EDGE --> PAL_EVENT_MODE_FALLING_EDGE ? Rx is "1" by default?

rusefillc pushed a commit to rusefi/rusefi that referenced this issue Jan 22, 2022
rusefillc pushed a commit to rusefi/rusefi that referenced this issue Jan 22, 2022
@rusefillc
Copy link
Contributor Author

@mck1117 any ideas why does it start right after standby command with CAN transiever?

@mck1117
Copy link

mck1117 commented Feb 5, 2022

TJA1051

image

yellow = CAN_TX
pink = CAN_RX (via opamps, connected to PA0)
blue = CANH

when we shut down the STM32 drags CAN_TX down (ie, dominant), and after 1ms the transmitter times out (prevents hung bus), when it times out it goes back high and wakes the STM32

edit: never mind, I got it to do it once with no edge on rx, with the stm asleep for about 300us before it woke up

@rusefillc
Copy link
Contributor Author

@mck1117 I am super confused

do we have same or difference behavior? Do you have desired behavior? Because I believe i have desired behavior?

https://youtu.be/c19ICpoVFuE

@rusefillc
Copy link
Contributor Author

forgot to mention that I had a mod to change op-amp divider ratio

IMG_20220209_160803

@mck1117 says he had similar mod

@rusefillc
Copy link
Contributor Author

just removed the mod and board no longer wakes up, the op-amp divider change is mandatory

@andreika-git
Copy link
Collaborator

We should test another option: use +5V VIO for CAN driver instead of 3.3V - maybe it's better than trying to bypass the opamp divider...

@mck1117
Copy link

mck1117 commented Feb 9, 2022

That would work (CAN RX is of course 5v tolerant), or we can add a line on the MCU module that goes directly to PA0 instead of thru the opamp.

@rusefillc
Copy link
Contributor Author

i believe the open question if we should mod one of alphax boards to triple-check or just fab with 5v CAN VIO without a HW test of rev A

@mck1117 any chance you would be available to test rev A of alpha with +5v VIO?

@rusefillc rusefillc changed the title No wake up with TJA1442AT No wake up with TJA1442AT - 5v CAN power supply Feb 14, 2022
@rusefillc rusefillc assigned andreika-git and unassigned mck1117 Feb 14, 2022
@rusefillc rusefillc changed the title No wake up with TJA1442AT - 5v CAN power supply not next revision No wake up with TJA1442AT - 5v CAN power supply Feb 14, 2022
@rusefillc rusefillc changed the title not next revision No wake up with TJA1442AT - 5v CAN power supply [not next revision] No wake up with TJA1442AT - 5v CAN power supply Feb 14, 2022
@rusefillc rusefillc assigned rusefillc and unassigned andreika-git Feb 14, 2022
@rusefillc
Copy link
Contributor Author

image

@rusefillc
Copy link
Contributor Author

Complete failure of my experiment - standby always reboots right away unconditionally

op-amp resistor hack removed
corner lead lifted
red jumper added 5v confirmed in red jumper

same result with following tests:
standby request via CAN
standby request via USB with external CAN device connected
standby request via USB with external CAN device disconnected

image

image

@andreika-git
Copy link
Collaborator

Does CAN work by itself with the red jumper?

@rusefillc
Copy link
Contributor Author

standby request via CAN meaning I have a lua script "onCanRecieve of packet 0x570 sleep' so yes, RX worked

just tested can transmit as well just to be sure and it works

image

@andreika-git
Copy link
Collaborator

Proposal: connect a resistor (3..10k?) to CAN_TX and +5V.

@rusefillc
Copy link
Contributor Author

10K between TX and +5v has changed things but did not solder the overall issue

good news there is no auto-reboot, i.e. "go to sleep" works via CAN now

still broken: no wake up on next CAN message

now I will solder test point for RX

@rusefillc
Copy link
Contributor Author

I am failing to do these HW mods that's above my skillset, we need to go a different route.

while adding RX test point I've shorted the board somewhere. I had to remove the resistor and red jumper wire to get board back to life

i got board back to life

i've added red wire and TX pull-up

and now it reboots instead of sleep :(

let me see if @mck1117 can ship his alphax board to @NMSTEC maybe @NMSTEC would be better than me at HW hacks

@NMSTEC
Copy link

NMSTEC commented Feb 18, 2022

Just makes prototyping easier with less chance of damaging pads or board. Can also run wires to a breadboard for prototyping.
Used it often when I needed to constantly pull eeproms off OEM ecus.

@rusefillc
Copy link
Contributor Author

@andreika-git please add resistor provisions

@rusefillc rusefillc assigned andreika-git and NMSTEC and unassigned rusefillc Feb 18, 2022
andreika-git added a commit that referenced this issue Feb 18, 2022
@andreika-git
Copy link
Collaborator

Done
image

@rusefillc
Copy link
Contributor Author

See #38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants