RetroBSD

2.11BSD operating system for microcontrollers
It is currently Thu Sep 24, 2020 9:23 pm

All times are UTC




Post new topic Reply to topic  [ 192 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10  Next
Author Message
PostPosted: Wed Sep 16, 2015 8:43 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1081
Location: Sunnyvale, CA
You are welcome!
I know how difficult it is to revive a new board for the first time. :)


Top
 Profile  
 
PostPosted: Thu Sep 17, 2015 8:58 am 

Joined: Mon Nov 24, 2014 1:07 pm
Posts: 58
I spoke too soon! I've tried a few sd cards including one that is known to work on my fubarino. I've also tried 2 different sd card image files and this is what I get:

Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.

4.4BSD-Lite build 0 compiled 2015-09-14
root@goa.vak.ru:litebsd-sources/sys/compile/HMZ144.pic32
cpu: PIC32MZ2048ECG144 rev A5, 200 MHz
oscillator: system PLL div 1:6 mult x100
cache: 16/4 kbytes
real mem = 512 kbytes
avail mem = 344 kbytes
using 18 buffers containing 73728 bytes of memory
spi1 at pins sdi=D14/sdo=D15/sck=D1
spi2 at pins sdi=D7/sdo=G8/sck=G6
Ethernet PHY not detected
uart2 at pins rx=E9/tx=E8, interrupts 145/146/147, console
sd0 at port spi2, pin cs=B14
gpio0 at portA, pins ii---ii-iiiiii--
gpio1 at portB, pins i-iiiiii--iiiiii
gpio2 at portC, pins -----------iiii-
gpio3 at portD, pins --iiiii--oiiii-i
gpio4 at portE, pins --------iiiiiiii
gpio5 at portF, pins -------i--iiiiii
gpio6 at portG, pins iiii--i-i-----ii
gpio7 at portH, pins iiiiiiiiiiiiiiii
gpio8 at portJ, pins iiiiiiooiiiiiiii
gpio9 at portK, pins --------iiiiiiii
sd0: type SDHC, size 7761920 kbytes, speed 16 Mbit/sec
sd0a: partition type b7, sector 2, size 204800 kbytes
sd0b: partition type b8, sector 409602, size 32768 kbytes
sd0c: partition type b7, sector 475138, size 102400 kbytes
ufs_mountroot failed: 22
panic: cannot mount root
syncing disks... done

dumping to dev 1, offset 408576
dump device bad


Any ideas?? Sorry in advance if it's something stupid. BTW it's a Rev B board not Rev C if that makes any difference.

Thanks,

Dan


Top
 Profile  
 
PostPosted: Fri Sep 18, 2015 11:24 am 

Joined: Mon Nov 24, 2014 1:07 pm
Posts: 58
I just tried another sd card, a 32Gb Sandisk Ultra. Same results :( I hope my board is ok. I think I'll check for differences between Rev B and Rev C boards in case there's a change that affects the sd card slot...


Top
 Profile  
 
PostPosted: Fri Sep 18, 2015 7:41 pm 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1081
Location: Sunnyvale, CA
Hi Dan,

I still have no idea. Looks like the hardware is OK. As I can see from your boot message:
Code:
sd0a: partition type b7, sector 2, size 204800 kbytes
sd0b: partition type b8, sector 409602, size 32768 kbytes
sd0c: partition type b7, sector 475138, size 102400 kbytes

This means the kernel has been able to correctly read a partition table at sector 0. So the SPI interface signals and clock rate are correct. But somehow it fails to mount the filesystem. I suppose it cannot find the superblock at expected place (sector 2).

I need to try the latest image on my HMZ144 board. May be something in the build procedure just went wrong.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 19, 2015 7:03 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1081
Location: Sunnyvale, CA
I've been able to reproduce the same situation on my HMZ144 board. Surely the kernel is broken somehow. I'm trying to figure out.


Top
 Profile  
 
PostPosted: Sat Sep 19, 2015 8:58 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1081
Location: Sunnyvale, CA
Fixed!
The kernel failed to map the root device name "sd0a" to major/minor number, and tried to mount wrong partition. Now it should work correctly.

Dan, please try the revision 274 when available on the autobuild server.


Top
 Profile  
 
PostPosted: Sat Sep 19, 2015 5:24 pm 
Contributor

Joined: Mon Nov 12, 2012 1:34 pm
Posts: 1092
Hi Serge,

I just realized I could order an MZ...EF cpu module for my explorer 16.

Any chance of putting up a version of litebsd for that?

I just noticed there is a version of retrobsd for that that I haven't tried yet :).

Lots of fun :).

Wiz


Top
 Profile  
 
PostPosted: Mon Sep 21, 2015 8:34 am 

Joined: Mon Nov 24, 2014 1:07 pm
Posts: 58
Hi Serge,

I tried the 274 release and it still won't quite boot, it does get a bit further and twice I've seen the shell prompt but the system crashes as soon as I type a command in. Here's the console output that I got when using two different SD cards and verifying the kernel was flashed correctly...

Code:
4.4BSD-Lite build 0 compiled 2015-09-19
    root@goa.vak.ru:litebsd-sources/sys/compile/HMZ144.pic32
cpu: PIC32MZ2048ECG144 rev A5, 200 MHz
oscillator: system PLL div 1:6 mult x100
cache: 16/4 kbytes
real mem = 512 kbytes
avail mem = 344 kbytes
using 18 buffers containing 73728 bytes of memory
spi1 at pins sdi=D14/sdo=D15/sck=D1
spi2 at pins sdi=D7/sdo=G8/sck=G6
Ethernet PHY not detected
uart2 at pins rx=E9/tx=E8, interrupts 145/146/147, console
sd0 at port spi2, pin cs=B14
gpio0 at portA, pins ii---ii-iiiiii--
gpio1 at portB, pins i-iiiiii--iiiiii
gpio2 at portC, pins -----------iiii-
gpio3 at portD, pins --iiiii--oiiii-i
gpio4 at portE, pins --------iiiiiiii
gpio5 at portF, pins -------i--iiiiii
gpio6 at portG, pins iiii--i-i-----ii
gpio7 at portH, pins iiiiiiiiiiiiiiii
gpio8 at portJ, pins iiiiiiooiiiiiiii
gpio9 at portK, pins --------iiiiiiii
sd0: type SDHC, size 31166976 kbytes, speed 16 Mbit/sec
sd0a: partition type b7, sector 2, size 204800 kbytes
sd0b: partition type b8, sector 409602, size 32768 kbytes
sd0c: partition type b7, sector 475138, size 102400 kbytes
WARNING: preposterous clock chip time -- CHECK AND RESET THE DATE!

starting file system checks.
/dev/rsd0a: file system is clean; not checking
starting network
kernel fault 0xa at pc=9d04f5f8, badvaddr=c0110cdc
panic: trap
syncing disks... 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 giving up

dumping to dev 2, offset 64512
dump device bad
Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California.  All rights reserved.

4.4BSD-Lite build 0 compiled 2015-09-19
    root@goa.vak.ru:litebsd-sources/sys/compile/HMZ144.pic32
cpu: PIC32MZ2048ECG144 rev A5, 200 MHz
oscillator: system PLL div 1:6 mult x100
cache: 16/4 kbytes
real mem = 512 kbytes
avail mem = 344 kbytes
using 18 buffers containing 73728 bytes of memory
spi1 at pins sdi=D14/sdo=D15/sck=D1
spi2 at pins sdi=D7/sdo=G8/sck=G6
Ethernet PHY not detected
uart2 at pins rx=E9/tx=E8, interrupts 145/146/147, console
sd0 at port spi2, pin cs=B14
gpio0 at portA, pins ii---ii-iiiiii--
gpio1 at portB, pins i-iiiiii--iiiiii
gpio2 at portC, pins -----------iiii-
gpio3 at portD, pins --iiiii--oiiii-i
gpio4 at portE, pins --------iiiiiiii
gpio5 at portF, pins -------i--iiiiii
gpio6 at portG, pins iiii--i-i-----ii
gpio7 at portH, pins iiiiiiiiiiiiiiii
gpio8 at portJ, pins iiiiiiooiiiiiiii
gpio9 at portK, pins --------iiiiiiii
sd0: type SDHC, size 31166976 kbytes, speed 16 Mbit/sec
sd0a: partition type b7, sector 2, size 204800 kbytes
sd0b: partition type b8, sector 409602, size 32768 kbytes
sd0c: partition type b7, sector 475138, size 102400 kbytes
WARNING: preposterous clock chip time -- CHECK AND RESET THE DATE!

starting file system checks.
kernel fault 0x2 at pc=00000007, badvaddr=00000006
panic: trap
syncing disks... done

dumping to dev 2, offset 64512
dump device bad
Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California.  All rights reserved.

4.4BSD-Lite build 0 compiled 2015-09-19
    root@goa.vak.ru:litebsd-sources/sys/compile/HMZ144.pic32
cpu: PIC32MZ2048ECG144 rev A5, 200 MHz
oscillator: system PLL div 1:6 mult x100
cache: 16/4 kbytes
real mem = 512 kbytes
avail mem = 344 kbytes
using 18 buffers containing 73728 bytes of memory
spi1 at pins sdi=D14/sdo=D15/sck=D1
spi2 at pins sdi=D7/sdo=G8/sck=G6
Ethernet PHY not detected
uart2 at pins rx=E9/tx=E8, interrupts 145/146/147, console
sd0 at port spi2, pin cs=B14
gpio0 at portA, pins ii---ii-iiiiii--
gpio1 at portB, pins i-iiiiii--iiiiii
gpio2 at portC, pins -----------iiii-
gpio3 at portD, pins --iiiii--oiiii-i
gpio4 at portE, pins --------iiiiiiii
gpio5 at portF, pins -------i--iiiiii
gpio6 at portG, pins iiii--i-i-----ii
gpio7 at portH, pins iiiiiiiiiiiiiiii
gpio8 at portJ, pins iiiiiiooiiiiiiii
gpio9 at portK, pins --------iiiiiiii
sd0: type SDHC, size 31166976 kbytes, speed 16 Mbit/sec
sd0a: partition type b7, sector 2, size 204800 kbytes
sd0b: partition type b8, sector 409602, size 32768 kbytes
sd0c: partition type b7, sector 475138, size 102400 kbytes
WARNING: preposterous clock chip time -- CHECK AND RESET THE DATE!

starting file system checks.
PID 7 (fsck_ffs) protection violation at 0: BadVAddr = 00000000
fsck: /dev/rsd0a: Killed by signal 11
Unknown error; help!
Enter pathname of shell or RETURN for sh:
erase ^H, kill ^U, intr ^C status ^T
kernel fault 0x6 at pc=99025820, badvaddr=c0100008
panic: trap
syncing disks... done

dumping to dev 2, offset 64512
dump device bad
Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California.  All rights reserved.

4.4BSD-Lite build 0 compiled 2015-09-19
    root@goa.vak.ru:litebsd-sources/sys/compile/HMZ144.pic32
cpu: PIC32MZ2048ECG144 rev A5, 200 MHz
oscillator: system PLL div 1:6 mult x100
cache: 16/4 kbytes
real mem = 512 kbytes
avail mem = 344 kbytes
using 18 buffers containing 73728 bytes of memory
spi1 at pins sdi=D14/sdo=D15/sck=D1
spi2 at pins sdi=D7/sdo=G8/sck=G6
Ethernet PHY not detected
uart2 at pins rx=E9/tx=E8, interrupts 145/146/147, console
sd0 at port spi2, pin cs=B14
gpio0 at portA, pins ii---ii-iiiiii--
gpio1 at portB, pins i-iiiiii--iiiiii
gpio2 at portC, pins -----------iiii-
gpio3 at portD, pins --iiiii--oiiii-i
gpio4 at portE, pins --------iiiiiiii
gpio5 at portF, pins -------i--iiiiii
gpio6 at portG, pins iiii--i-i-----ii
gpio7 at portH, pins iiiiiiiiiiiiiiii
gpio8 at portJ, pins iiiiiiooiiiiiiii
gpio9 at portK, pins --------iiiiiiii
sd0: type SDHC, size 31166976 kbytes, speed 16 Mbit/sec
sd0a: partition type b7, sector 2, size 204800 kbytes
sd0b: partition type b8, sector 409602, size 32768 kbytes
sd0c: partition type b7, sector 475138, size 102400 kbytes
WARNING: preposterous clock chip time -- CHECK AND RESET THE DATE!

starting file system checks.


Thanks, Dan


Top
 Profile  
 
PostPosted: Mon Sep 21, 2015 8:57 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1081
Location: Sunnyvale, CA
Hi Dan,

How about the power source - is it reliable enough?

I'm also suspicious of the 32Gb SD card. Some of these SDHC devices don't work reliably enough when connected via SPI interface. Can you please try any older card, better 2Gb or less?

--Serge


Top
 Profile  
 
PostPosted: Mon Sep 21, 2015 9:12 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1081
Location: Sunnyvale, CA
Hi Wiz,
wiz wrote:
I just realized I could order an MZ...EF cpu module for my explorer 16.
Any chance of putting up a version of litebsd for that?

I just noticed there is a version of retrobsd for that that I haven't tried yet :).

Yes, we have a RetroBSD kernel configuration for Microchip Explorer16 board, but I'm afraid nobody except me had ever use it. :(

Unfortunately, one cannot run LiteBSD directly on the Explorer16, as it has no slot for SD card. You need to use the PICtail SD daughter board for it. I can prepare a kernel, in case you have the SD board.

--Serge


Top
 Profile  
 
PostPosted: Mon Sep 21, 2015 11:44 am 

Joined: Mon Nov 24, 2014 1:07 pm
Posts: 58
Hi Serge,

I went back to using my 8Gb card (smallest I have) that worked perfectly with RetroBSD on my fubarino. I then changed to a decent external power supply and after a few reboots it did arrive at the login prompt. However it's very flaky and will crash if I dare to even look at it. I think I'll go over the board with my scope sometime this week and see if there's any glitches anywhere on the power side of things. I might even add some extra decoupling caps to see if that helps things.

Thanks for all your help on this! Much appreciated,

Dan


Top
 Profile  
 
PostPosted: Mon Sep 21, 2015 12:21 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Today's SDcards may take 250mA peak. So a decent (500-800mA min) voltage regulator is a must. Also decouple Vdd at the sdcard's socket with 10-22uF ceramic multilayer.
4k7-10k pullups at Sdcard's signals may help too.
Also decrease the sdcard's SPI clock to ie. 5MHz until you will see a stable system.

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Mon Sep 21, 2015 7:09 pm 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1081
Location: Sunnyvale, CA
Hi Dan,

Probably I've been too optimistic about the 16.6Mhz default clock rate for SD interface. It works for me, but may be I'm just lucky. On RetroBSD, we use 13.3MHz (the hardware cannot generate 16MHz anyway), ant it's pretty stable. I will reduce it to 12.5MHz in LiteBSD rev275 - please, try this version.

--Serge


Top
 Profile  
 
PostPosted: Mon Sep 21, 2015 7:27 pm 
Contributor

Joined: Mon Nov 12, 2012 1:34 pm
Posts: 1092
Hi Serge,

I don't have any of the modules [I think], but can kludge something :).

Just gotta know which pins :). So if it works for the Microchip stock module, I 'should' be able to hack it from there :).

An ethernet driver would be most cool. I don't remember off hand what goodies it has on the PCB but it shouldn't be too hard to kludge things in, once the software is running :).

I guess I will order the module and see what I can do!

It would be nice to join the MZ fun.

Wiz


Top
 Profile  
 
PostPosted: Tue Sep 22, 2015 8:06 am 

Joined: Mon Nov 24, 2014 1:07 pm
Posts: 58
Hmm, looks like a very dodgy sd card socket to me. I'll check it over and clean the contacts and let you know what happens. When I did get it to boot it was nice and stable, then I moved the board and it crashed straight away. Some bad connection there somewhere :(

Thanks for lowering the sd card clock rate Serge, I think that'll help keep the system stable once I've got it up and running properly.

Dan


Top
 Profile  
 
PostPosted: Tue Sep 22, 2015 3:32 pm 
Contributor

Joined: Mon Nov 12, 2012 1:34 pm
Posts: 1092
Hi Dan and Serge,

Dodgy pins.

Turn signal stopped working.... Bulb bad?? NO!

Pulled bulb out, put bulb back in.... Working.

Until the next day !!

Bought 'new' one. Seems to be working now??!!

Kept old bulb to take a closer look. Probably just corrosion. That is running out of plating on the pins.

Given the tiny connectors in modern electronics, I bet we will see a real rash of dodgy pin problems in the future.

Take apart a 'modern' cell phone for a real laugh!

Let's hear it for properly designed GOLD plated contacts !!

Wiz


Top
 Profile  
 
PostPosted: Wed Sep 23, 2015 2:51 pm 

Joined: Mon Nov 24, 2014 1:07 pm
Posts: 58
Hi Wiz and Serge,

I'm not totally convinced that it's dodgy pins but maybe noise pickup. It's just so flaky and doesn't matter what sd card or power supply I use. After several boots it just gets stuck in a loop and I've spent more time than I can spare on it for the moment. I'll pick it up again sometime late October. For the moment it can go on the pile of dodgy electronic gizmo's which is now:

2.8" tft touchscreen, bluetooth module, olimex hmz144, FTDI232R breakout board, Xilinx XS300E dev kit and a jtag usb adaptor.

Damn it, this list is growing by the month and is rather expensive too :( I just hope the Olimex board is more reliable than their usb serial cable which seems to keel over after the board I have it connected to power cycled more than twice, grrrr!! My TFT's are like your proverbial light bulbs wiz!!! lol

Dan


Top
 Profile  
 
PostPosted: Wed Sep 23, 2015 7:02 pm 
Contributor

Joined: Mon Nov 12, 2012 1:34 pm
Posts: 1092
Hi Dan and all,

I can REALLY relate. I have a huge pile of stuff too!

My background is telephony and there people talk about 99.999% reliable. Which is not much down time each year!

Redudancy, backup, etc. We still supply a 'central office simulator'. We had a recurrent problem that would only occur when our box was driving a pay telephone??!!

Eventually we bought a digital storage oscope. An old failing unit was hooked up to a pay telephone and the problem FINALLY understood and fixed.

The unit had a current source to supply the telephone line and a relay to switch on the ringing voltage. Pay telephones have very large inductors to actuate the coin mechanism and when the current was turned off a HUGE negative glitch occured. A simple 1n4004 catch diode eliminated the problem after years of wondering and trying various fixes for what proved not to be the problem :).

Lots of fun :)

p.s.- If you send me your pile maybe I can get some of it to work and save myself lots of $$ ;).

Wiz


Top
 Profile  
 
PostPosted: Wed Oct 21, 2015 10:14 am 

Joined: Mon Nov 24, 2014 1:07 pm
Posts: 58
Hi All,

Well after lots of messing about with this board (HMZ144) I still don't have it running reliably. I've tried at least 5 different SD Cards of varying size and speeds, changed power supply and it still crashes more often than Windows Me used to :/

I unleashed my DSO and looked at the clocks on the board and I have to say the crystal doesn't seem to be giving me a decent signal at all. I wonder if that's the cause of all my problems. Does anyone else have a Rev B HMZ144 with issues or is it just me?

The 12MHz crystal is almost totaly devoid of a clock signal whilst the RTC crystal looks nice.

Any pointers are very welcome!! Please, please, I beg you, lol :)

Thanks, Dan

Oh, BTW Wiz I managed to get my TFT's to work in the end. Sorry about that, the pile of crap won't be sent your way :(


Top
 Profile  
 
PostPosted: Wed Oct 21, 2015 1:24 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Do you have a crystal attached to OSC1 as the primary clock signal for pic32MZ? I think I saw somewhere people have to use an external clock oscillator, as the older pic32mz revisions got problem with that. For example - the SDZL board uses an external 24MHz oscillator, afaik.
PS: See below from 2014 Errata - even the point 41. is not clear enough about that - a "crystal resonator" or a "crystal" is not the same as a "crystal oscillator", of course, but let us assume the errata author is writing about a "crystal resonator", otherwise she/he will not recommend an "external clock" (ie. a canned, 3.3V cmos output crystal oscillator) as the WA.
Attachment:
Errata MZ 2014 - Prim Osc.JPG
Errata MZ 2014 - Prim Osc.JPG [ 114.37 KiB | Viewed 26529 times ]

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 192 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10  Next

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron




Powered by phpBB® Forum Software © phpBB Group

BSD Daemon used with permission