March 28, 2024, 11:06:10 PM

Recent posts

#21
JTAG / Faulty ARM-JTAG-SWD?
Last post by Artem - March 23, 2024, 07:39:12 PM
Hi all,
embedded development is relatively new topic for me and I learn everything myself, so I apologize for possibly stupid questions here.

So, I've bought a kit of ARM-USB-TINY-H, ARM-JTAG-SWD and ARM-JTAG-20-10 to work first of all with Atmel chips like SAMC21, SAMD21 etc. I tried to test the whole setup with Sammy-C21 development board (ATSAMC21G18) which I have at hand, and I failed to get openocd connected to it. Of course, I might have wrong Openocd config, but one thing makes me a bit confused. At my work we have Atmel-Ice debugger, and I used it many times with Sammy-C21. With Atmel-Ice, one can hook up the debugger to the target board, while both devices are powered up, and unless you run openocd, the Sammy-C21 works normally - the firmware is running, the LED is blinking. But when I connect the Olimex devices (ARM-USB-TINY-H -> (no cable in between, as mentioned in docs!!) ARM-JTAG-SWD adapter -> ARM-JTAG-20-10 adapter), the Sammy-C21 does not seem to work (LED does not blink, though 3.3V voltage is ok, doesn't seem to be shorted or something). I tested the pinout in 20-10 adapter, that is OK. I tried to connect only JTAG-SWD adapter plus 20-10 pin adapter to the SAmmy-C21, with the main TINY-H disconnected, and that already does not allow Sammy to run. So, my hypothesis is that JTAG-SWD adapter might be faulty. Or is that expected behavior, that it affects the target board even without openocd running? Is there any way to test the adapter before trying to get it replaced by reseller? Thanks.
#22
A13 / A13-SOM 512 USB0 doesn't work ...
Last post by dantonielli - March 22, 2024, 10:05:04 PM
Hello,

I'm trying to migrate a previously made project to the new Bullseye image. Burn the image to an SD and place it on a 512 mB A13-SOm board.

I managed to boot without problem, but the USB0 OTG is not working (it does not detect any device).

In the image I used previously (Whezzy with kernel 3.4.90+) I was able to make this USB work with the following configuration:

Quote[usbc0]
      usb_used = 1
      usb_port_type = 1;                
      usb_detect_type = 0;
      usb_id_gpio = ;
      usb_det_vbus_gpio =;
      usb_drv_vbus_gpio = port:PG12<1><0><default><0>
      usb_host_init_state = 1;

I understand that the most recent version of Debian performs the configuration through the device tree.

printenv message during boot:

QuoteHit any key to stop autoboot:  0
=> printenv
arch=arm
baudrate=115200
board=a13_olinuxino
board_id=4788
board_name=a13_olinuxino
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_efi_binary=load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootarm.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi
boot_efi_bootmgr=if fdt addr ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};else bootefi bootmgr;fi
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
boot_net_usb_start=usb start
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_syslinux_conf=extlinux/extlinux.conf
boot_targets=fel mmc0 usb0 pxe dhcp
bootcmd=run distro_bootcmd
bootcmd_dhcp=setenv devtype dhcp; run boot_net_usb_start; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n "${soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; setenv efi_old_vci ${bootp_vci};setenv efi_old_arch ${bootp_arch};setenv bootp_vci PXEClient:Arch:00010:UNDI:003000;setenv bootp_arch 0xa;if dhcp ${kernel_addr_r}; then tftpboot ${fdt_addr_r} dtb/${efi_fdtfile};if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r}; else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi;fi;setenv bootp_vci ${efi_old_vci};setenv bootp_arch ${efi_old_arch};setenv efi_fdtfile;setenv efi_old_arch;setenv efi_old_vci;
bootcmd_fel=if test -n ${fel_booted} && test -n ${fel_scriptaddr}; then echo '(FEL boot)'; source ${fel_scriptaddr}; fi
bootcmd_mmc0=devnum=0; run mmc_boot
bootcmd_pxe=run boot_net_usb_start; dhcp; if pxe get; then pxe boot; fi
bootcmd_usb0=devnum=0; run usb_boot
bootdelay=2
bootm_size=0xa000000
console=ttyS0,115200
cpu=armv7
dfu_alt_info_ram=kernel ram 0x42000000 0x1000000;fdt ram 0x43000000 0x100000;ramdisk ram 0x43300000 0x4000000
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
efi_dtb_prefixes=/ /dtb/ /dtb/current/
ethaddr=de:ad:be:ef:00:01
fdt_addr_r=0x43000000
fdtcontroladdr=5af530c0
fdtfile=sun5i-a13-olinuxino.dtb
kernel_addr_r=0x42000000
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}
mmc_boot=if mmc dev ${devnum}; then devtype=mmc; run scan_dev_for_boot_part; fi
mmc_bootdev=0
partitions=name=loader1,start=8k,size=32k,uuid=${uuid_gpt_loader1};name=loader2,size=984k,uuid=${uuid_gpt_loader2};name=esp,size=128M,bootable,uuid=${uuid_gpt_esp};name=system,size=-,uuid=${uuid_gpt_system};
preboot=usb start
pxefile_addr_r=0x43200000
ramdisk_addr_r=0x43300000
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done; setenv devplist
scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n "${soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run load_efi_dtb; fi;done;run boot_efi_bootmgr;if test -e ${devtype} ${devnum}:${distro_bootpart} efi/boot/bootarm.efi; then echo Found EFI removable media binary efi/boot/bootarm.efi; run boot_efi_binary; echo EFI LOAD FAILED: continuing...; fi; setenv efi_fdtfile
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scriptaddr=0x43100000
serial#=1625429806c121e6
soc=sunxi
stderr=serial,vga
stdin=serial,usbkbd
stdout=serial,vga
usb_boot=usb start; if usb dev ${devnum}; then devtype=usb; run scan_dev_for_boot_part; fi
usbnet_devaddr=de:ad:be:ef:00:01
uuid_gpt_esp=c12a7328-f81f-11d2-ba4b-00a0c93ec93b
uuid_gpt_system=69dad710-2ce4-4e3c-b16c-21a1d49abed3
vendor=olimex

Environment size: 4533/131068 bytes

From here I can get that the .dtb that the u-boot is raising is sun5i-a13-olinuxino.dtb, but I can't edit it so that the port works.

sun5i-a13-olinuxino.dts file:

Quoteusb@1c13000 {
                        compatible = "allwinner,sun4i-a10-musb";
                        reg = <0x1c13000 0x400>;
                        clocks = <0x02 0x17>;
                        interrupts = <0x26>;
                        interrupt-names = "mc";
                        phys = <0x0e 0x00>;
                        phy-names = "usb";
                        extcon = <0x0e 0x00>;
                        allwinner,sram = <0x0f 0x01>;
                        dr_mode = "otg";
                        status = "okay";
                        phandle = <0x36>;
                };

phy@1c13400 {
                        #phy-cells = <0x01>;
                        compatible = "allwinner,sun5i-a13-usb-phy";
                        reg = <0x1c13400 0x10 0x1c14800 0x04>;
                        reg-names = "phy_ctrl\0pmu1";
                        clocks = <0x02 0x4d>;
                        clock-names = "usb_phy";
                        resets = <0x02 0x00 0x02 0x01>;
                        reset-names = "usb0_reset\0usb1_reset";
                        status = "okay";
                        usb0_id_det-gpios = <0x0d 0x06 0x02 0x10>;
                        usb0_vbus_det-gpios = <0x0d 0x06 0x01 0x20>;
                        usb0_vbus-supply = <0x10>;
                        usb1_vbus-supply = <0x11>;
                        phandle = <0x0e>;
                };

I try modifying dr_mode="otg" to dr_mode="host" but it didn't work, I can't find the rest of the parameters


What i am missing?
I would appreciate any help.

#23
FPGA / ILA on GateMateA1-EVB
Last post by cchndl - March 22, 2024, 12:26:06 PM
Hi,

I have one of the GateMate evaluation boards and it runs quite fine, I already got VGA output and a softcore to work.

However, now I wanted to try and run the ILA from Colognechip. I am trying the official blink example.

The ILAcop.py tries to talk to the FPGA over SPI, which is provided by the FTDI chip on the official EVB. I can modify the python so that it flashes the bitstream over the dirtyjtag, but since the ILA wants to talk over the SPI to retreive the samples, I get an error when trying to start the capture.

As far as I see, the SPI on the Olimex board is not connected, at least chip U3 is missing.

Did somebody get the ILA to run? Did you use some cust_gpio_* settings that worked or is there something else that I am missing?

Thanks in advance,
cchndl
#24
ARDUINO / Re: Security mode change issue
Last post by LubOlimex - March 22, 2024, 08:23:45 AM
We are neither proficient enough nor have we have sufficient experience to give you a solution or an explanation, however Quectel forums and support are pretty good - make sure to post in Quectel forums and/or contact Quectel support directly. Notice that BC66 is no longer available so our modules now come with BC660 (there are some significant differences between BC66 and BC660 and it might be possible that BC660 works better with SSL and PSK):

https://olimex.wordpress.com/2023/11/02/nb-iot-bc66-now-replaced-with-nb-iot-bc660/
#25
ARDUINO / Security mode change issue
Last post by ThomasFox - March 21, 2024, 11:53:14 AM
Hello Olimex Community,

I've been following the thread about SSL and PSK configurations for the NB-IoT BC66 module and noticed that several users, including Chris5, have encountered issues when changing the security level or secure mode. Despite following the provided examples and even updating the firmware, the connection still fails with an 'Other Error' message.

Could you provide a step-by-step guide or a working example that addresses these specific issues? Additionally, are there any common pitfalls or additional configurations that we should be aware of when setting up SSL (via MQTT) or PSK (via LWM2M) on the NB-IoT BC66 module?

Thank you for your assistance.
#26
A10 / Re: Calibration Issues with L...
Last post by kalata23 - March 21, 2024, 11:16:34 AM
Just modify the olinuxino-ts script (/usr/lib/olinuxino/olinuxino-ts) for your needs, then you can run it once and reboot.

#27
ESP32 / ESP32-C3 De kit 3D printable b...
Last post by henksteen - March 20, 2024, 09:30:50 PM
I'm looking for a 3D printable box enclosure for the C3 lipo devkit. Anyone happen to have such a design? (stl or openscad so I can tweak it a bit)
#28
TERES DIY Laptop / Re: Development of Teres-2
Last post by DiTBho - March 20, 2024, 05:34:51 PM
Just checked, the pinetab2 uses the Rockchip RK3566 SoC
#29
A10 / Re: Calibration Issues with L...
Last post by akr - March 20, 2024, 02:51:41 PM
Hello,

So i was  finally able to get the correct calibration matrix . What i did was use the xlibinput_calibration (https://github.com/kreijack/xlibinput_calibrator/tree/master)  instead of xinput_calibrator. So the the xlibinput_calibration  seems to generate the correct calibration matrix for my device. So as shown bellow instead of the Coordinate Transformation Matrix(122) i have a new libinput Calibration Matrix(280) which seems to work.

olimex@a10-olinuxino:/etc/X11/xorg.conf.d$ xinput list-props "1c25000.rtp"
Device '1c25000.rtp':
        Device Enabled (121):   1
        Coordinate Transformation Matrix (122): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        libinput Calibration Matrix (280):      1.113068, 0.011788, -0.059270, 0.001714, 1.349589, -0.187455, 0.000000, 0.000000, 1.000000
        libinput Calibration Matrix Default (281):      1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        libinput Send Events Modes Available (243):     1, 0
        libinput Send Events Mode Enabled (244):        0, 0
        libinput Send Events Mode Enabled Default (245):        0, 0
        Device Node (246):      "/dev/input/event5"
        Device Product ID (247):        1, 1

 So i can set the property with command :  "xinput set-prop "1c25000.rtp" "libinput Calibration Matrix"  1.113068, 0.011788, -0.059270, 0.001714, 1.349589, -0.187455, 0.000000, 0.000000, 1.000000" and it works untill reboot.

But when i do "sudo reboot" then the value is again set to default 1 0 0 0 1 0 0 0 1. But now how can make the changes persistent. The olinuxino-ts file changes the Coordinate Transformation Matrix and not libinput Calibration Matrix(280). I tried to set the Option to just "Calibration Matrix"
 "$MATRIX"  and then set the correct $Matrix value generated with xlibinput_calibration but still  not working. Do you have any idea what i could do next?
#30
A13 / Re: A13-SOM Help with UE306 dr...
Last post by LubOlimex - March 20, 2024, 08:22:10 AM