After the boot chain matches the installed Debian image, robotcontrol.service can pass its PWM prerequisite instead of exiting from rc_startup_routine with status 255. Commission this fault in layers: identify the running software, prove driver enumeration, align the bootloader and root filesystem, then test the service and application separately.
Baseline software and failure capture
Before anything else, confirm which kernel and filesystem are actually running. The reported installation used BBB-blank-debian-9.5-iot-armhf-2018-10-07-4gb.img.xz in the built-in eMMC, Debian 9.5, kernel 4.14.71-ti-r80, and Robot Control library 1.0.3 on MODEL_BB_BLUE.
- Run
uname -aand record the complete kernel string. The affected system reportedLinux beaglebone 4.14.71-ti-r80 #1 SMP PREEMPT Fri Oct 5 23:50:11 UTC 2018 armv7l GNU/Linux. - Run
systemctl status robotcontrol.serviceimmediately after a failed start. - Separate the initiating failure from the systemd consequences. The significant line is
timeout reached while waiting for pwm driver;TIMEOUT REACHED, exit status255, andFailed with result ‘exit-code’follow from that prerequisite failure. - Record whether the failure occurs only during boot or also when the service is started after the system finishes booting. A boot-only failure points toward initialization order or latency; failure in both cases points toward the active boot chain, driver binding, or configuration.
Do not move on until the kernel identity and the first rc_startup_routine error have been captured from the same boot.
PWM and peripheral enumeration
A startup timeout does not by itself prove that PWM hardware is defective. The startup routine waits for an operating-system interface; it can time out when that interface is missing, appears under an unexpected configuration, or becomes available too late.
- Run
rc_test_driversafter the system reaches a stable login state. - Check every PWM result individually. The reported test returned
PASSEDforpwm0,pwm1, andpwm2. - Review the surrounding platform results. The same run passed
gpio 0throughgpio 3,eqep0througheqep2,pru-rproc,uart1,uart2,uart4,uart5,i2c1,i2c2,spi,LED, andADC iio. - Compare the driver test with the service result from the same boot. If PWM passes after login while
ExecStartPre=/usr/bin/rc_startup_routinefails during startup, investigate boot-time availability before replacing hardware.
| Observation | Engineering interpretation | Next action |
|---|---|---|
| PWM tests fail after login | The required kernel interfaces are unavailable or incorrectly bound | Correct the image, boot configuration, or driver loading before testing the service |
| PWM tests pass, service always fails | The service and interactive test may be seeing different initialization or configuration conditions | Check the active bootloader and image as one matched set |
| PWM tests pass, service fails only at boot | The interface may appear after the startup routine times out | Inspect initialization order without treating a longer timeout as the primary fix |
Proceed only when rc_test_drivers gives an unambiguous pass-or-fail result for all three PWM interfaces.
Active boot-chain identification
Flashing a root filesystem does not prove that the board started through the bootloader packaged with that filesystem. A newer SD-card image can still be launched through older boot components retained in eMMC. That mismatch can change hardware descriptions, overlays, or the interfaces presented to user space even though Linux reaches a login prompt.
- Identify the boot source used for the current test: built-in eMMC or removable SD card.
- Determine where the first-stage and later boot components came from. Read the boot log and compare its bootloader identity with the release information supplied with the selected image.
- Check that the running kernel reported by
uname -abelongs to the filesystem release you intended to boot. - If testing a newer image on SD, account for an older eMMC bootloader taking control before the SD filesystem is loaded. Do not infer the bootloader source solely from the location of the root filesystem.
The earlier image ran rc_balance successfully on the same equipment, while the named 2018 image produced the timeout. That history makes a physical PWM failure less likely, but the deciding checks remain driver enumeration and boot-chain identity. Do not move on until the bootloader, kernel, and root filesystem are identified as a compatible set.
Bootloader and image alignment
Use one controlled recovery path. Updating eMMC is appropriate when the final system must boot independently from eMMC. Booting from SD is suitable for diagnosis only when the board is verified to use the SD image’s intended boot components.
- Back up any required eMMC data before changing partitions or boot records.
- Obtain the complete image and flashing procedure intended for the board model. Use the maintainer’s current method for updating eMMC and its bootloader together.
- Flash the selected target once. Avoid mixing an old eMMC bootloader with a different SD root filesystem during the validation run.
- Power-cycle the board, then repeat
uname -aand the bootloader-identity check. A reboot alone is not proof that the new boot components were selected.
Do not copy recollected commands that overwrite eMMC or fill boot areas with zeros. That operation may destroy partition contents, and no exact erase range or recovery procedure is defined here. Continue only after the intended boot source and matching image are confirmed after a cold start.
Service and application commissioning
- Run
rc_test_drivers. RequirePASSEDforpwm0,pwm1, andpwm2before starting the control service. - Start
robotcontrol.serviceand inspectsystemctl status robotcontrol.service. - Confirm that
/usr/bin/rc_startup_routineno longer reportstimeout reached while waiting for pwm driveror exits with status255. - Confirm that the service remains active rather than entering the failed state.
- Only then select and run
rc_balance. Treat application behavior as a separate test from driver and service startup.
If the service still fails but the three PWM tests pass, compare a manual post-boot start with the automatic boot start. A manual-only success isolates the remaining problem to service ordering or interface readiness. Do not move on until the service starts under the same boot path required in production.
Cold-boot verification
- Remove power, restore power, and allow the normal boot sequence to complete without manual intervention.
- Check
systemctl status robotcontrol.serviceand verify that no PWM timeout or status255appears. - Run
rc_test_driversand verifyPASSEDfor all three PWM interfaces. - Start or observe
rc_balancethrough the intended service configuration and confirm that it remains operational.
A warm restart can hide boot-source and initialization-order faults. Accept the repair only after repeatable cold boots produce the same kernel identity, driver results, active service state, and application startup.
FAQ
Can I fix the PWM timeout by reinstalling librobotcontrol?
Not when the active bootloader, kernel, and root filesystem are mismatched. First identify the boot source, then require rc_test_drivers to pass pwm0, pwm1, and pwm2.
Does a passed rc_test_drivers result prove boot startup will work?
No. A post-login pass proves the interfaces exist at test time; rc_startup_routine can still time out earlier in the boot sequence. Compare automatic startup with a manual post-boot service start.
Can I boot a new SD image with the old eMMC bootloader?
The board may load a newer SD filesystem through older boot components retained in eMMC. Verify the actual bootloader source and align it with the selected kernel and filesystem before accepting the configuration.
Does one successful reboot verify the BeagleBone repair?
No. Perform a cold boot, confirm the expected uname -a output, require all three PWM tests to pass, verify robotcontrol.service remains active, and confirm rc_balance starts without the PWM timeout.