RetroBSD

2.11BSD operating system for microcontrollers
It is currently Fri Oct 23, 2020 11:40 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Mon Aug 15, 2011 10:44 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1081
Location: Sunnyvale, CA
Serge, there is a small issue with renaming KHZ to CPU_KHZ (e.g. in sd.c) as we use pb frequency for brg calculation there. In general we have to have CPU_KHZ and PB_KHZ as the pb frequency may differ from the cpu one (currently are equal set in UBW32 driver.
-p

This seems quite reasonable. I will add BUS_KHZ parameter to Makefile. It also should be used for UART baud rate generator.
___
Serge

_________________
--Serge


Top
 Profile  
 
PostPosted: Mon Aug 15, 2011 4:12 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Serge, it seems the ubw32 is setting the pb bus speed to 80MHz, so the -DBUS_KHZ=40000 in Makefile shall be 80000. I will double check, though..
Pito

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Mon Aug 15, 2011 4:15 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
The HIDboot sets:
#pragma config FPBDIV = DIV_1 // Peripheral Clock divisor
so the pb bus is 80MHz.
Pito

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Tue Aug 16, 2011 1:21 pm 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1081
Location: Sunnyvale, CA
Hi Pito,
You are absolutely right. I corrected BUS_KHZ parameter as 80 MHz by default. BTW, I also fixed SD driver, added a timeout delay as you suggested. Tested on nine different types of SD cards - now it works perfectly.
Thanks,
---Serge

_________________
--Serge


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

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