Recent Posts

Pages: [1] 2 3 ... 10
1
General topics / Replacing a flash chip
« Last post by Lukapple on Today at 04:56:03 AM »
Hi all!
Iíve a question about flash chips (this time not related to Moteinos).
Few days ago I did the firmware upgrade on my Zyxel firewall (model usg110). After that the firewall didnít boot anymore, so I attached the cable to the console port to see whatís going on. From the logs I can see that it has problems with mounting the partition (Error: We can't mount /share/AP-image/FW2/wtp_image to /etc/zyxel/ftp/wtp_image partition). Reloading the firmware trough console didnít help.
My prediction is that the flash is corrupt. I took the device apart and noticed that the flash chip (and flash controller) is soldered to the add-on PCB which can easily be removed (see attached photo).

I donít have much experiences with the flash chips so my question here is if will it work if I just simply replace the flash chip with the new one (assuming that flash controller is ok) ? or do you need to program it before you attach it?

p.s. The device is out of warranty, so I have nothing to lose :)

Here is the console log:
Code: [Select]
.

U-Boot 2011.03 (Development build, svnversion: u-boot:422M, exec:exported) (Build time: Feb 21 2013 - 13:27:33)




BootModule Version: V1.10 | 02/21/2013 10:45:46

DRAM: Size = 1024 Mbytes



Press any key to enter debug mode within 3 seconds.



Enter Debug Mode


ZW110> atkz -f -l 192.168.2.200




-f -l 192.168.2.200

OK


ZW110>

ZW110> atgof




Booting...


Connect a computer to port 1 and FTP to 192.168.2.200 to upload the new file.



Firmware received ...
Start to check file system...
/dev/sda3: 11/20480 files (0.0% non-contiguous), 6720/81920 blocks
/dev/sda4: 11/23040 files (0.0% non-contiguous), 7044/92160 blocks
Done

Building ...

[Update Filesystem]
.Updating Code
./.-.\.|./.-.\.|./.-.\.|./.-.\.|./.-.\.|./.-.\.|./.-.\.|./.-.\.|./.-.\.|./.-.\.|./.-.\.|./.-.\.|./.-.\.|../.-.\..

.done
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so


[Update Kernel]
.Extracting Kernel Image
../

.done
.Writing Kernel Image ... done
.Validate Kernel Image ... done
Restarting system.


U-Boot 2011.03 (Development build, svnversion: u-boot:422M, exec:exported) (Build time: Feb 21 2013 - 13:27:33)




BootModule Version: V1.10 | 02/21/2013 10:45:46

DRAM: Size = 1024 Mbytes



Press any key to enter debug mode within 3 seconds.

.............................................................

Start to check file system...
/dev/sda6: 491/20480 files (0.8% non-contiguous), 36713/81920 blocks
/dev/sda7: 322/23040 files (9.9% non-contiguous), 17772/92160 blocks
Done
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

mount: mount point /etc/zyxel/ftp/wtp_image does not exist
Error: We can't mount /share/AP-image/FW2/wtp_image to /etc/zyxel/ftp/wtp_image partition
Kernel Version: V3.10.87 | 2020-12-01 05:01:44
ZLD  Version: V4.60(AAAA.1) | 2020-12-01 06:10:59
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000


*** NMI Watchdog interrupt on Core 0x01 ***
.$0.0x0000000000000000.at.0x0000000010008ce0
.v0.0xffffffff80e2e018.v1.0x0000000000000001
.a0.0xfffffffffffffffd.a1.0x0000000000000000
.a2.0xffffffff80da0000.a3.0x8000000002376600
.a4.0x8000000002376600.a5.0x8000000000336180
.a6.0x800000000030bec0.a7.0x0000000000000000
.t0.0x0000000010008ce0.t1.0x000000001000001f
.t2.0x000000000000000a.t3.0x80000000003dc000
.s0.0x8000000002376600.s1.0x0000000000000001
.s2.0xffffffff80d93e20.s3.0xffffffff80e0c500
.s4.0xffffffff808746e0.s5.0x0000000000000079
.s6.0x0000000000000000.s7.0x800000004f800000
.t8.0xffffffff814894c0.t9.0xffffffff80876138
.k0.0x0000000000000000.k1.0x0000000000000000
.gp.0x80000000003c0000.sp.0x80000000003c3b40
.s8.0xffffffff80d94f90.ra.0xffffffff8087d5b4
.err_epc.0xffffffff8087d5b8.epc.0xffffffff808746e0
.status.0x0000000010488ce4.cause.0x0000000040808800
.sum0.0x0000000000000000.en0.0x0000000000000000
*** Chip soft reset soon ***

*** NMI Watchdog interrupt on Core 0x02 ***
.$0.0x0000000000000000.at.0x0000000010008ce0
.v0.0xffffffff80e2e018.v1.0x0000000000000001
.a0.0xfffffffffffffffb.a1.0x0000000000000000
.a2.0xffffffff80da0000.a3.0x8000000002380600
.a4.0x8000000002380600.a5.0x8000000000336080
.a6.0x800000000030bea0.a7.0x0000000000000000
.t0.0x0000000010008ce0.t1.0x000000001000001f
.t2.0x000000000000000a.t3.0x800000004f008000
.s0.0x8000000002380600.s1.0x0000000000000001
.s2.0xffffffff80d93e20.s3.0xffffffff80e0c500
.s4.0xffffffff808746e0.s5.0x0000000000000079
.s6.0x0000000000000000.s7.0x800000004f800000
.t8.0x0000000000000000.t9.0xffffffff80876138
.k0.0x0000000000000000.k1.0x0000000000000000
.gp.0x80000000003c8000.sp.0x80000000003cbb40
.s8.0xffffffff80d94f90.ra.0xffffffff8087d5b4
.err_epc.0xffffffff8087d5b8.epc.0xffffffff808746e0
.status.0x0000000010488ce4.cause.0x0000000040808800
.sum0.0x0000000000000000.en0.0x0000000000000000
*** Chip soft reset soon ***

*** NMI Watchdog interrupt on Core 0x03 ***
.$0.0x0000000000000000.at.0x0000000010008ce0
.v0.0xffffffff80e2e018.v1.0x0000000000000001
.a0.0xfffffffffffffff7.a1.0x0000000000000000
.a2.0xffffffff80da0000.a3.0x800000000238a600
.a4.0x800000000238a600.a5.0x800000004f039e80
.a6.0x0000000000000000.a7.0xffffffff80e714d8
.t0.0x0000000010008ce0.t1.0x000000001000001f
.t2.0x000000000000000a.t3.0x80000000003ac000
.s0.0x800000000238a600.s1.0x0000000000000001
.s2.0xffffffff80d93e20.s3.0xffffffff80e0c500
.s4.0xffffffff808746e0.s5.0x0000000000000079
.s6.0x0000000000000000.s7.0x800000004f800000
.t8.0x0000000000000000.t9.0xffffffff80876138
.k0.0x0000000000000000.k1.0x0000000000000000
.gp.0x80000000003d0000.sp.0x80000000003d3b40
.s8.0xffffffff80d94f90.ra.0xffffffff8087d5b4
.err_epc.0xffffffff8087d5b8.epc.0xffffffff808746e0
.status.0x0000000010488ce4.cause.0x0000000040808800
.sum0.0x0000000000000000.en0.0x0000000000000000
*** Chip soft reset soon ***
2
Moteino M0 / Powering M0 using higher voltage batteries instead of LiPo
« Last post by akstudios on January 24, 2021, 08:01:22 PM »
I have an M0 that I'd like to power via a bank of 8 AA batteries that add up to 12V. This is only in my specific use case where I need a higher voltage elsewhere in my circuit and would like to power the M0 directly from the VBAT/VIN pin. I won't be using the charger, so I'll take that out of the board as well, to avoid the reverse current flowing into the battery bank and exploding it.

My question is - would this still work? I know the voltage regulator should be rated up to 16V, but what about everything else? If we have 12V on the drain of MOSFET Q1 instead of the usual 3.7 to 4.2V from the LiPo, I guess things should still be okay? Not sure what part is being used here. But I'm assuming the Vgs(th) is low enough that 5V from USB would be shutting it off regardless of what is connected on the drain.

Alternatively, I can replace it with a P-channel FET that has a higher voltage rating if this doesn't suffice. Are there any other things I need to consider before I plug all of this in?
3
I got some help from Felix (thanks, Felix!) and have this working now. There are some updates to the Moteino M0 board manager that Felix did, and it was necessary to define the Winbond SPIFlash.

The mass storage examples from the TinyUSB library with the modifications are here if you are interested. https://github.com/brandock/TinyUSB-Examples-for-Moteino-M0

I was able to compile these with the Moteino M0 board manager (as updated) and the TinyUSB stack.

There is one extra example of a combination of the data logging and mounting the SPI flash as a USB mass storage device to retrieve the data.
5
Does anyone (Felix?) happen to know the part number for the "thumb terminal" component that's included with the Current Ranger? I love this part and I'd like to order another one for my CR (and more to use in future projects).

I searched Digikey and Mouser, but all of the "Screwless Terminal Blocks" I found have 4-pins instead of the 2-pin version that's included.

https://www.digikey.com/en/products/detail/cui-devices/TBL004-508-02BE-2GY/10442162
https://www.digikey.com/en/products/detail/phoenix-contact/1780808/4453214
https://www.digikey.com/en/products/detail/phoenix-contact/1790283/2177768

I'll probably end up getting some of these 4-pin versions and just snip off 2 pins to install into my CR, but if I can find the OG version Felix used, that'd be best!
6
Moteino M0 / Re: Can't Init Flash Memory on Moteino M0 [solved: pull radio CS HIGH!]
« Last post by Felix on January 18, 2021, 10:59:34 AM »
Thank you, please do follow up once you have a full working solution, I think what you're doing is of high interest!
7
Low Power Techniques / AB18X5 RTC instead of TPL5010
« Last post by Uncle Buzz on January 18, 2021, 07:13:31 AM »
Hi,

I would like to use the AB1805 like we use TPL5010, with a configurable period unlike the TPL5010, but I'm not sure we can configure the watchdog of the AB1805 like the one of TPL5010 :
I would like to set a time interval with an interrupt to wake up the microcontroller, and simultaneously start a timeout counter for the watchdog, waiting for the WDI input controlled by the microcontroller to stop the watchdog before the timeout, or active the reset output if timeout.

To my mind, the documentation is not clear how the watchdog is working. Is this TPL5010 scenario reproducible? From the AM18X5 Datasheet who is a clone, what I understand is that the watchdog timer is an independent function and is automatically restart after a timeout or a change in the level of the WDI pin. Is it possible to synchronize the interrupt timer function and the watchdog timer?

Has anyone used this RTC this way?

I also would like to use the internal RC oscillator of the microcontroller at 8MHz, and use the clockout output of AB1805 at 32.768kHz as an asynchronous external clock, at least to be able to calibrate the internal 8MHz oscillator. Is there any inconvenience to do this for lower consumption? Is it achievable? I saw I can use the internal 8MHz oscillator with an external 32.768KHz crystal in asynchronous mode, or an external clock signal in synchronous mode, but can I use the internal 8MHz oscillator with an external 32.768KHz clock signal in asynchronous mode?  (this question is specific to ATMEGA328p and 1284p)

EDIT:
Quote
18.11.8 ASSR Ė Asynchronous Status Register
Bit 6 Ė EXCLK: Enable External Clock Input
When EXCLK is written to one, and asynchronous clock is selected, the external clock input buffer is enabled and an external clock can be input on Timer Oscillator 1 (TOSC1) pin instead of a 32kHz crystal. Writing to EXCLK should be done before asynchronous operation is selected. Note that the crystal Oscillator will only run when this bit is zero.
If I'm not wrong, this ATMEGA datasheet extract means I can use an external clock in asynchronous mode from the RTC clock output, isn't it?
8
Hopefully I'm posting in the right forum or place!

I'm attempting to control a Salus RT500RF boiler controller - 868MHz.
I've already decoded the on/off control signals but I'm struggling to put together a sketch to be able to transmit the codes.

Hardware I have/would like to use
ESP8266 - Wemos Mini
RFM69HCW

Idea would be to have the ESP8266 running a web server and accessing http://ipaddress/ON or OFF to control/transmit the 868 signal. That bit is easy, I just need to write the transmission parts.

I've been trying to take apart the sketch here, but can't get anything to work as yet.
https://github.com/klattimer/salus-rt500rf/

I feel like this could be relatively simple as it should just be a case of transmitting the 1/0 High/Low with the correct length/gaps at the right frequency, repeated the correct number of times - as per the klattimer sketch, but can't seem to adapt it for the RFM69 module.

Using the klattimer example, let's say I want to transmit the following...

0xAA 0xAA 0xAA 0x2D 0xD4 0x00 0x01 0x01 0x5A
A    A    A    A    A    A    2    D    D    4    0    0    0    1    0    1    5    A
1010 1010 1010 1010 1010 1010 0010 1101 1101 0100 0000 0000 0000 0001 0000 0001 0101 1010

Any guides, pointers or snippets of code would be greatly appreciated.
9
Moteino / Re: Whole network stops transmitting.
« Last post by vooyeQ on January 17, 2021, 01:00:31 PM »
Reassembled all the nodes, updated with the newest libraries (gateway was up to date last time), FTDI adapter changed.

Antennas are simple helical ones, perpendicular to boards.

Small steps.. time will tell, waiting for next temperature spikes.

Ordered 3 more units to experiment with different sketches and register setups.


10
I am trying to get the msc_external_flash example sketch from the Adafruit TinyUSB library to work and mount the SPIFlash as a USB drive in Windows/MacOS. I can get the SPIFlash to initialize and list the files on the flash disk in the serial monitor, but it won't mount in Windows or MacOS as expected. I'm suspicious that I don't have all the proper settings for the W25X40CL Winbond SPIflash used by Moteino M0, but I can't say for certain. I am hoping someone has been down this road already and can point me in the right direction..

I'm compiling the Mass Storage examples from the Adafruit TinyUSB library. I compile them for the Adafruit Feather M0 board using the tinyUSB stack. I'm doing a couple of overrides in the sketches specific to the Moteino M0, namely:
Code: [Select]
#define EXTERNAL_FLASH_USE_SPI SPI
#define EXTERNAL_FLASH_USE_CS 8

and, in the setup()

Code: [Select]
#define EXTERNAL_FLASH_USE_SPI SPI
#define EXTERNAL_FLASH_USE_CS 8

Here are the definitions I'm using in Adafruit_SPIFlash/src/flash_devices.h.

Code: [Select]
// Brandock: Settings for the Winbond W25X40CL 4MiB SPI flash.
// Datasheet:
// https://www.winbond.com/resource-files/w25x40cl_e01.pdf
#define W25X40CL                                                             \
  {                                                                            \
    .total_size = (1UL << 22), /* 4 MiB */                                     \
        .start_up_time_us = 10000, .manufacturer_id = 0xef,                    \
    .memory_type = 0x30, .capacity = 0x13, .max_clock_speed_mhz = 104,         \
    .quad_enable_bit_mask = 0x00, .has_sector_protection = true,              \
    .supports_fast_read = true, .supports_qspi = false,                         \
    .supports_qspi_writes = false, .write_status_register_split = false,       \
    .single_status_byte = true, .is_fram = false,                             \
  }

I also add the flash device to Adafruit_SPIFlash/src/Adafruit_SPIFlashBase.cpp list of possible_devices

Code: [Select]
    // Other common flash devices
    W25Q16JV_IQ,
    W25X40CL,

I modify and load the SdFat_format example sketch to get the SPIFlash formatted. Then I modify and load the SdFat_datalogging sketch to get a file on the filesystem. Then I load the modified msc_external_flash sketch and see my file in the serial monitor.

Code: [Select]
Adafruit TinyUSB Mass Storage External Flash example
JEDEC ID: EF3013
Flash size: 4194304
Flash contents:
        14 data.csv

But -- the USB Mass Storage disk doesn't mount in MacOS nor Windows.

Any ideas would be appreciated.
Pages: [1] 2 3 ... 10