-
Posts
3892 -
Joined
-
Last visited
Content Type
Forums
Store
Crowdfunding
Applications
Events
Raffles
Community Map
Posts posted by martinayotte
-
-
CI LPS A16q2
What component is that ?
-
For UARTs, you don't need those library, you only need to access kernel serial device, such /dev/ttyS1, using python-serial.
For example, the following piece of code will print any character received on RX :
import serial serport = serial.Serial("/dev/ttyS1", 115200, timeout=1) while True: while serport.inWaiting() > 0: c = serport.read() print c
-
console=ttySAC2, 115200n8.That is a strange port ! It is usually ttyS0 ...
-
Last weekend, I've built and upgraded almost all my boards (2E/PC/PC+/Zero) and they are all on 4.10 now.
-
I *think* they're just bitbanging spi on that lib but not sure.
No ! it is using kernel spidev transactions thru /dev/spidev*.* devices.
-
That is also another solution ...
-
I don't know about specific WS2812 protocol, but doing an SPI transfer is about as simple as :
from pyA20 import spi spi.open("/dev/spidev0.0", mode=0, delay=0, bits_per_word=8, speed=5000000) data = [0,1,2,3,4,5,6,7,8,9] spi.xfer(data, len(data))
-
There are many ways. Some more complex than others.
The simplest on is running a startup script and call it in /etc/rc.local :
#!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. /root/my-startup-script.sh & exit 0
-
No, SPI Flash comes empty, you need to push u-boot-sunxi-with-spl.bin into it using mtd-utils.
flashcp /usr/lib/linux-u-boot-dev-pine64_5.24_arm64/u-boot-sunxi-with-spl.bin /dev/mtd0
-
Yes, spidev0.0 is dedicated to on-board SPI Flash.
-
If you use Mainline, then simply remove the whole xradio paragraph in DT.
-
For me "time is the missing ingredient" ...
If you have some spare time, you could check the latency time between the FIFO fills, and also if CS is asserted during the whole large transfer, not only during the FIFO size of 64 bits.
-
I doubt there will be huge performance gain, because even with DMA, there will be some latency for DMA buffer been filled.
When I ported the FIFO large transfer, I said that when I get a chance, I will check the latency with logic analyser, but I didn't got chance yet.
-
What do you mean about the SPI driver ?
-
I have built one image a week ago ...
Are you using Armbian build process ?
-
Could be several possibilities :
- check your wiring again.
- check if the Flash chip part number/manufacturer is in the list of flashrom/flashchips.h
- provide us the log output of the execution to see what JEDEC ID is reported.
-
It is good to disable it in the DT, but I presume leaving PA20 floating won't disable power since floating has similar effect to HIGH level on most chips.
-
u-boot for OPi+2E is currently from v2017.01 mainline from http://git.denx.de/u-boot.git
-
Make sure that PA20 is LOW, it is the WIFI-POWER-EN.
-
Oh ! you received a SoPine ? Lucky guy !
-
Unfortunately, the occurrence is not 24hrs ...
So, I will have to wait more, maybe 48hrs, or maybe it is even random ...
EDIT : after 48hrs, the issue didn't appeared yet, so I guest it is random ...
-
Maybe I've didn't explain it well : ntpdate or ntp server are also facing the same -EINVAL seen with date when symptoms kick in, but not after reboot. Something happened, probably at the 24th hour (I will see later today) which make the symtoms resurrect somehow, probably after a systemd or cron task job. I will check dmesg/syslog next time ...
But, still, why PineA64 is having that trouble and not OPiPC2, they are both using the same kernel branch ?
-
To avoid further lengthy discussion about this A64 date/time clock issue, I've created new thread here : https://forum.armbian.com/index.php/topic/3458-a64-datetime-clock-issue/#entry24814
-
Let's first recap from the other thread :
I found a strange bug and seen it twice in a week :
After few days running, my PineA64 had wrong date, some thing like "Tue Mar 13 20:50:11 EDT 2153".
Trying to restart NTP didn't fix it. Trying to set it manually give me an error :
root@pine64:~# date -s "2017-02-03 00:00:01"
date: cannot set date: Invalid argumentDoing an "strace" with it reveal that it can not write system clock :
settimeofday({1486098000, 0}, NULL) = -1 EINVAL (Invalid argument)
openat(AT_FDCWD, "/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3Doing search on the net, I've found http://nerdbynature.de/s9y/2009/07/22/cannot-set-date-Invalid-argumentand http://www.mail-archive.com/bug-coreutils@gnu.org/msg14103.html, but not real answers other than it is really the kernel that are f*k*ing up with the system clock. And the issue is gone if I simply reboot the board. Really strange ... Especially that it happened only on PineA64 ...
As someone got the similar issue ?
And here is Zador's first reply :
Is there support for the hardware RTC in mainline (assuming you are testing the mainline)? If yes, then it may be related to wrong RTC settings like external or internal oscillator. If not - then maybe it's related to the arch timer bug? https://github.com/longsleep/linux-pine64/issues/44#issuecomment-263060276
I think kernel just prevents unsafe date/time changes, there are several -EINVAL returns in the date/time changing code.
And my first reply :
I was just looking at DT about this, because if I remember, I didn't had the issue up until recently.
I'm seeing that in the old longsleep DT, it was using 'sun50i-rtc' and in the current it is using 'sun6i-a31-rtc'.
Since I kept also several A64 armbian previous images, I will look into them too.
(I will also check what is the frequency of the occurence, because maybe it happen every 24hrs by reading wrong value from a sync service call. Let see tomorrow ...)
(Another thing I found : the H3 has /dev/rtc and clear trace in dmesg, but not with H5 or A64, no trace at all. But why I don't have the same issue with H5 ?)
Now, here is my latest investigations :
Both H5 and A64 doesn't probe RTC driver successfully, explaining why dmesg doesn't mentioned it (I hate driver which are not verbose on failures !)
But, why H5 doesn't react the same as A64 ?
I will have to wait until issue re-appear to dig further in /var/log/syslog , maybe tomorrow !
BTW, Zador, the -EINVAL seen on "date" command is only shown when symptom occurred, not after reboot... (let's wait tomorrow to see)
As I said, I suspect "systemd" compatiblilty issue here.
BTW, each time the issue occurred, the current SSH session has been kicked out, probably due to time elapsed been too large, 120 years ...
Orange Pi zero NOR Flash
in Allwinner sunxi
Posted
You don't need to do all this since nightly builds already provides SPI-NOR support. The only thing you have to do is changing the partitions sizes in the current DT :
spi@01c68000 {
compatible = "allwinner,sun8i-h3-spi";
reg = <0x1c68000 0x1000>;
interrupts = <0x0 0x41 0x4>;
clocks = <0x2 0x1e 0x2 0x52>;
clock-names = "ahb", "mod";
dmas = <0x19 0x17 0x19 0x17>;
dma-names = "rx", "tx";
pinctrl-names = "default";
pinctrl-0 = <0x1a>;
resets = <0x2 0xf>;
status = "okay";
#address-cells = <0x1>;
#size-cells = <0x0>;
linux,phandle = <0x4c>;
phandle = <0x4c>;
spi-flash@0 {
#address-cells = <0x1>;
#size-cells = <0x0>;
compatible = "jedec,spi-nor";
reg = <0x0>;
spi-max-frequency = <0x989680>;
status = "okay";
partitions {
compatible = "fixed-partitions";
#address-cells = <0x1>;
#size-cells = <0x1>;
partition@0 {
label = "uboot";
reg = <0x0 0x100000>;
};
partition@100000 {
label = "env";
reg = <0x100000 0x100000>;
};
partition@200000 {
label = "data";
reg = <0x200000 0x200000>;
};
};
};
};
You will see the MTD partitions by doing "cat /proc/mtd", and you can use flashcp from mtd-utils to write to /dev/mtd0.