Commit Graph

258 Commits

Author SHA1 Message Date
laforge 74ce3dc461 add hardvare version 0.4 data
git-svn-id: https://svn.openpcd.org:2342/trunk@258 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-10-04 14:39:14 +00:00
laforge f796b3e49a - first working tested version if system_irq demux
- fix minor issues with PIT timer code
- make new led blinkcode implementation work


git-svn-id: https://svn.openpcd.org:2342/trunk@257 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-10-04 01:38:04 +00:00
laforge 0d69fadb71 move udp irq/refill back to flash for now
git-svn-id: https://svn.openpcd.org:2342/trunk@256 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-10-04 01:35:08 +00:00
laforge 904f944d0d reduce number of large request contexts to four, should be sufficient for now
git-svn-id: https://svn.openpcd.org:2342/trunk@255 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-10-04 01:34:40 +00:00
laforge 9e6368f195 - add function to read RC632 serial number
git-svn-id: https://svn.openpcd.org:2342/trunk@254 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-10-03 15:41:14 +00:00
laforge d9c442272b - we have to respond with a STALL to SET_CONFIGURATION
- add a comment about this strange fact
- some code cleanup
- add missing 'break' after end of GET_DESCRIPTOR USB_DT_DEVICE


git-svn-id: https://svn.openpcd.org:2342/trunk@253 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-10-03 15:27:01 +00:00
laforge bfff30bfec - add proper system interrupt (shared) demultiplexing code
- port debug unit, watchdog timer, periodic interval timer to system_irq.c


git-svn-id: https://svn.openpcd.org:2342/trunk@252 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-10-01 21:45:43 +00:00
laforge 2b55faec5a synchronize bit clock based on software trigger (needed for cdiv_sync)
git-svn-id: https://svn.openpcd.org:2342/trunk@251 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-10-01 21:44:32 +00:00
laforge f1cae2aa9e - add command to read rc632 serial number via USB
git-svn-id: https://svn.openpcd.org:2342/trunk@250 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-10-01 21:44:06 +00:00
laforge 7a651e94c5 make gcc happy (signed/unsigned)
git-svn-id: https://svn.openpcd.org:2342/trunk@249 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-10-01 21:43:26 +00:00
laforge 010aaff97b add support for cdiv (sample clock) bit clock synchronization
git-svn-id: https://svn.openpcd.org:2342/trunk@248 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-10-01 21:42:30 +00:00
laforge e2432d0574 re-define REQ_CTX_STATE_FREE != 0 to detect bugs
git-svn-id: https://svn.openpcd.org:2342/trunk@247 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-10-01 20:34:07 +00:00
laforge 2fa1074157 initialize req_ctx state as free.
git-svn-id: https://svn.openpcd.org:2342/trunk@246 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-10-01 20:33:38 +00:00
laforge 833d0d5ec2 clean up dbgu startup printout
git-svn-id: https://svn.openpcd.org:2342/trunk@245 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-10-01 20:33:09 +00:00
laforge fabe00c6f2 split irq handler in two parts to make it callable from FIQ
git-svn-id: https://svn.openpcd.org:2342/trunk@244 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-10-01 20:32:56 +00:00
laforge 79011bae80 fix gcc complains about 'alarm' shadowing a global declaration
git-svn-id: https://svn.openpcd.org:2342/trunk@243 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-10-01 20:30:41 +00:00
laforge 6c0b462a2c - finish implementation of timers based on PIT
- add [untested] code for timer-based LED blink codes


git-svn-id: https://svn.openpcd.org:2342/trunk@242 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-10-01 19:23:15 +00:00
laforge 778802a3a4 make sure we actually build the wdt code
git-svn-id: https://svn.openpcd.org:2342/trunk@241 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-09-30 22:38:36 +00:00
laforge 48afc6a1d1 - add (currently inactive) code for the watch dog timer
git-svn-id: https://svn.openpcd.org:2342/trunk@240 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-09-30 22:37:48 +00:00
laforge 0a3534e799 - introduce FIQ stack of 1k (way too large, but we might have debug...)
- move FIQ processing out of DFU Flash and into application/RAM


git-svn-id: https://svn.openpcd.org:2342/trunk@239 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-09-30 22:25:29 +00:00
laforge 2e6ea1d6ac acknowledge SET_INTERFACE request
git-svn-id: https://svn.openpcd.org:2342/trunk@238 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-09-30 22:23:25 +00:00
laforge d61fac8fff - Add revision to USB descriptor
git-svn-id: https://svn.openpcd.org:2342/trunk@237 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-09-30 22:21:39 +00:00
laforge 7d1d85c02e add stub for later implementation of suspend/resume
git-svn-id: https://svn.openpcd.org:2342/trunk@236 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-09-30 22:18:42 +00:00
laforge 9f45ae4e59 - more accurate (and USB compliant) state transitions
- make gcc spit a bit less warnings


git-svn-id: https://svn.openpcd.org:2342/trunk@235 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-09-30 22:12:08 +00:00
laforge e9902c5680 - free all pending contexts when endpoint is being reset
- speed up usb processing by putting respective sections in RAM


git-svn-id: https://svn.openpcd.org:2342/trunk@234 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-09-30 14:01:59 +00:00
laforge 568a1b28f4 - add dbgu key '9' for software reset
- fix dbgu welcome message


git-svn-id: https://svn.openpcd.org:2342/trunk@233 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-09-27 17:26:01 +00:00
laforge 2db7d2d9d9 - increase number of large (2k) contextx to 8
- move req_ctx_find_get into ram, since this is frequently used within
  interrupt handlers and thus ought to be as fast as possible
- correctly initialize req_ctx size (bugfix!)


git-svn-id: https://svn.openpcd.org:2342/trunk@232 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-09-27 17:21:18 +00:00
laforge caa13ece6e add __ramfunc (.ramfunc) to data section
git-svn-id: https://svn.openpcd.org:2342/trunk@231 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-09-27 17:19:39 +00:00
laforge 23d2398121 build DFU with correct definitions for PICC
git-svn-id: https://svn.openpcd.org:2342/trunk@230 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-09-25 23:30:35 +00:00
laforge 41423de586 - fix build process of USB string header files (make it work with first 'make' run)
git-svn-id: https://svn.openpcd.org:2342/trunk@229 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-09-25 21:49:08 +00:00
laforge 89c40594e7 - fix minor issues with USB string support
git-svn-id: https://svn.openpcd.org:2342/trunk@228 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-09-25 21:36:42 +00:00
laforge 5872753e2d - Include tool for Converting ASCII to UTF-16LE in C-Header
- Build UTF-16LE USB String descriptors from ASCII File
- Introduce USB String Descriptor to DFU and runtime firmware


git-svn-id: https://svn.openpcd.org:2342/trunk@227 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-09-25 21:23:52 +00:00
laforge 6b13ecdab0 use new officially assigned vendor/product id
git-svn-id: https://svn.openpcd.org:2342/trunk@226 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-09-25 14:52:19 +00:00
laforge a914cae281 use officially assigned usb vendor and product id's
git-svn-id: https://svn.openpcd.org:2342/trunk@225 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-09-25 14:50:05 +00:00
laforge c96e8111bf disalbe rc632 register level debugging by default
git-svn-id: https://svn.openpcd.org:2342/trunk@224 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-09-23 17:48:20 +00:00
laforge 57d818a32d - fix return value in case of unknown command
git-svn-id: https://svn.openpcd.org:2342/trunk@223 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-09-23 14:50:11 +00:00
laforge 460ece8365 - Implement runtime DFU switching and reset-after-update. This means
we can now reflash without any buttons or replugging of the device


git-svn-id: https://svn.openpcd.org:2342/trunk@222 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-09-23 14:49:43 +00:00
laforge d23fda3be3 add reset key '9' to dfu dbgu code
git-svn-id: https://svn.openpcd.org:2342/trunk@221 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-09-23 14:31:27 +00:00
laforge 1ba82b7107 make sure DFU loader always prints some informational / copyright message upon startup
git-svn-id: https://svn.openpcd.org:2342/trunk@220 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-09-22 22:10:46 +00:00
laforge 706ffa9f3b - move large rctx definitions to req_ctx.h
- add more fine-grained debugging macros in pcd_enumarate.c
- resolve race conditions between main-loop ep_refill and irq-triggered
  ep_refill by adding one irq-[b]locking variant
- consolidate endpoint reset code into reset_ep()
- add code to handle correct transmission and reception of usb transfers
  larger than endpoint size
- use new jump address (0x104000) in DFU Cstartup.S
- move main_usb to pcd subdirectory
- fix include/compile.h make dependencies
- make usb benchmark code use new large req_ctx


git-svn-id: https://svn.openpcd.org:2342/trunk@219 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-09-22 21:41:22 +00:00
laforge 1c2b1d2201 - we increase the DFU size from 4k to 16k size. This is mainly due to the
SAM7S128 and SAM7S256 being restricted to 16k lock region size.  If we want
  to lock the bootloader, it has to be 16k aligned.  This wastes a lot of
  memory, since a non-debug DFU implementation fits currently into less than
  4k. But anyway, we have lots of flexibility for the future given that amount
  of space.
- The DFU size change introduces also a change in dfu_api location to 0x103fd0
- Allow GETSTATE and GETSTATUS from runtime mode (optional in DFU spec)
- Make dfu_status a .data.shared variable, since it is used from GETSTATUS
  which we already support in runtime mode
- do some led switching while flashing via DFU
- disable all non-usb/dbgu interrupts when switching to DFU mode
- fix interrupt-storm problem when dbgu is used in DFU loader
- add missing linker script for SAM7S128


git-svn-id: https://svn.openpcd.org:2342/trunk@218 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-09-22 21:29:57 +00:00
laforge 238c6c3c0a fix completely broken logic of processing pending outbound packets. We now do
all the req_ctx state changes from within pcd_handler.c and only expose the
refill_ep() functions.

It's questionable whether we need to keep calling those functions all the time
either.  Once kicked off, the tx completion interrupts of the UDC will refill
the pipe as long as there is data available.

So realistically speaking, we'd only need to trigger tx once (and keep
triggering until no EBUSY or other error is signalled anymore).  Some form of
state machine would be fine for doing this, one that registers a timer with
the core OS timer (once we have something equivalent to 'struct timer_list'.



git-svn-id: https://svn.openpcd.org:2342/trunk@217 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-09-22 21:21:28 +00:00
laforge 3b1d90fae2 fix a wrong memset length (we want length of atqa, not length of the pointer to it).
git-svn-id: https://svn.openpcd.org:2342/trunk@216 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-09-22 21:10:01 +00:00
laforge cf4d20a642 DFU works (fix various bugs such as forgetting to shift the page number, checking for invalid page numbers, off-by-one error in flash page calculation, etc.)
git-svn-id: https://svn.openpcd.org:2342/trunk@215 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-09-21 16:25:01 +00:00
laforge 817d9211d5 some code cleanup
git-svn-id: https://svn.openpcd.org:2342/trunk@214 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-09-21 12:03:18 +00:00
laforge 59a94d4e6a use POSITIVE_EDGE as a workaround to the irq storm if HIGH_LEVEL is used. This basically disables any input from the dbgu serial port, but we don't need it in DFU anyway.
git-svn-id: https://svn.openpcd.org:2342/trunk@213 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-09-21 09:50:49 +00:00
laforge b0ec57cfec add some debugging output to flash_page()
git-svn-id: https://svn.openpcd.org:2342/trunk@212 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-09-21 09:48:49 +00:00
laforge be2a03b5a7 add dfu flash header file
git-svn-id: https://svn.openpcd.org:2342/trunk@211 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-09-20 12:09:20 +00:00
laforge 26bc6a6883 - add support for flashing to DFU
git-svn-id: https://svn.openpcd.org:2342/trunk@210 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-09-20 12:08:36 +00:00
laforge eecad3322a re-set SAK during every chaining iteration (Henryk Ploetz)
git-svn-id: https://svn.openpcd.org:2342/trunk@209 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
2006-09-20 12:08:08 +00:00