Hello again!

I'm trying to solve a minor problem. I made a systemd service which starts 
my program automatically. My problem is that my program is starting too 
early which causes this error:

AssertionError: pruio_new failed (b'cannot open /dev/uio5')


The program will exit and the systemd service will keep restarting the 
program until eventually (less than a minute) the program will run 
successfully.

Here is my systemd service file:

[Unit]
After=generic-board-startup.service libpruio-lkm.service
StartLimitIntervalSec=0

[Service]
Type=simple
Restart=always
User=debian
WorkingDirectory=/opt/rad/virtual_sensor
ExecStart=/opt/rad/virtual_sensor/virtual_sensor

[Install]
WantedBy=multi-user.target

I realize that since the libpruio-lkm service doesn't exit, putting it in 
the 'after' section doesn't really make sense. Surely someone has dealt 
with this problem before, but I couldn't find it while searching.
On Friday, August 21, 2020 at 1:49:01 AM UTC-5 TJF wrote:

> Am Donnerstag, 20. August 2020 20:27:41 UTC+2 schrieb andrew...@gmail.com:
>>
>> Sorry about that.
>>
>
>> My adc measurements are good and stable. My only issue now is that I 
>> can't seem to enable the serial port under libpruio. I'll post my code here:
>>
>
> Apology accepted.
>
> Fine, that ADC is OK. I hope your code calls the destructor 
> pruio_destroy() at the end.
>  
>
>> I tried every mode from 0 to 7 and got the same result.
>>
>
> You configured the hardware, but I guess you didn't care about the 
> software. Did you load the UArt kernel driver?
>
> When you configure pins from a device tree blob the kernel also loads the 
> matching driver. In contrast, libpruio doesn't inform the kernel about 
> changes. It's under your control to make this happen.
>
> If you're sure that you want Uart-1 on P9_24/P9_26, and that wont change, 
> then it's best to install a custom device tree blob for that two pins. 
> Check out the docs for section Custom overlay 
> <http://users.freebasic-portal.de/tjf/Projekte/libpruio/doc/html/ChaPins.html#sSecCustom>.
>  
> You can use the tool src/config/dts_custom.bas 
> <http://users.freebasic-portal.de/tjf/Projekte/libpruio/doc/html/dts__custom_8bas.html>
>  
> to create that blob in folder /lib/firmware. Your configuration (edit in 
> source and compile) should look like
>
> M(P9_24) = CHR(0)
>>
> M(P9_26) = CHR(0)
>>
>
> Perhaps you also want to adapt the file name. When the .dtbo file is in 
> place, edit /boot/uEnv.txt to load it and reboot.
>
> Regards
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/6ef84d84-5d6b-4ed5-93ea-b9d8c588a95cn%40googlegroups.com.

Reply via email to