Commit 8edec4b8 authored by Jake Read's avatar Jake Read

new image and some firmware

parent eb244876
......@@ -2,7 +2,7 @@
This is a message passing device and USB link for the [automatakit](https://gitlab.cba.mit.edu/jakeread/automatakit) architecture.
![board](/images/fab-front-rpi.jpg)
![board](/images/atkrouter.jpg)
![board](/images/fab-front.jpg)
......
......@@ -33,5 +33,3 @@ VREG-AP2112
RS-485-SN75C1168
# Notes
- want new rj45 conn: top tab
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
......@@ -22,17 +22,17 @@ UsedLibrary="D:/Dropbox (Personal)/CBA/doc/libraries_jake/eagle/sparkfun/SparkFu
UsedLibrary="D:/Dropbox (Personal)/CBA/doc/libraries_jake/eagle/jake/tag-connect-2050.lbr"
[Win_1]
Type="Schematic Editor"
Number=1
File="atkrouter-v01.sch"
View="-379.937 -103.342 574.167 510.011"
WireWidths=" 0.0762 0.1016 0.127 0.15 0.2 0.2032 0.254 0.3048 0.4064 0.508 0.6096 0.8128 1.016 1.27 2.54 0.1524"
Type="Library Editor"
Number=2
File="D:/Dropbox (Personal)/CBA/doc/libraries/eagle/passives.lbr"
View="-4.68099 -2.71724 10.9823 4.6057"
WireWidths=" 0.0762 0.1016 0.15 0.2 0.2032 0.254 0.3048 0.4064 0.508 0.6096 0.8128 1.016 1.27 2.54 0.1524 0.127"
PadDiameters=" 0.254 0.3048 0.4064 0.6096 0.8128 1.016 1.27 1.4224 1.6764 1.778 1.9304 2.1844 2.54 3.81 6.4516 0"
PadDrills=" 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.65 0.7 0.75 0.8 0.85 0.9 1 0.6"
ViaDiameters=" 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 1.05 1.1 1.15 1.2 1.3 0"
ViaDrills=" 0.2 0.25 0.3 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 1 0.35"
HoleDrills=" 0.2 0.25 0.3 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 1 0.35"
TextSizes=" 0.254 0.3048 0.4064 0.6096 0.8128 1.016 1.27 1.4224 1.6764 1.9304 2.1844 2.54 3.81 5.08 6.4516 1.778"
TextSizes=" 0.254 0.3048 0.4064 0.6096 0.8128 1.016 1.4224 1.6764 1.9304 2.1844 2.54 3.81 5.08 6.4516 1.778 1.27"
PolygonSpacings=" 0.254 0.3048 0.4064 0.6096 0.8128 1.016 1.4224 1.6764 1.778 1.9304 2.1844 2.54 3.81 5.08 6.4516 1.27"
PolygonIsolates=" 0.254 0.3048 0.4064 0.6096 0.8128 1.016 1.27 1.4224 1.6764 1.778 1.9304 2.1844 2.54 3.81 6.4516 0"
MiterRadiuss=" 0.254 0.3175 0.635 1.27 2.54 1 2 2.5 5 7.5 10 0"
......@@ -41,10 +41,10 @@ DimensionExtWidths=" 0.127 0.254 0.1 0.13 0.26 0"
DimensionExtLengths=" 1.27 2.54 1 2 3 0"
DimensionExtOffsets=" 1.27 2.54 1 2 3 0"
SmdSizes=" 0.3048 0.1524 0.4064 0.2032 0.6096 0.3048 0.8128 0.4064 1.016 0.508 1.27 0.6604 1.4224 0.7112 1.6764 0.8128 1.778 0.9144 1.9304 0.9652 2.1844 1.0668 2.54 1.27 3.81 1.9304 5.08 2.54 6.4516 3.2512 1.27 0.635"
WireBend=4
WireBendSet=31
WireBend=0
WireBendSet=0
WireCap=1
MiterStyle=0
MiterStyle=1
PadShape=0
ViaShape=1
PolygonPour=0
......@@ -63,22 +63,20 @@ SwapLevel=0
ArcDirection=0
AddLevel=2
PadsSameType=0
Layer=97
Views=" 1: -379.937 -103.342 574.167 510.011"
Sheet="1"
Layer=21
[Win_2]
Type="Library Editor"
Number=2
File="D:/Dropbox (Personal)/CBA/doc/libraries/eagle/passives.lbr"
View="-4.68099 -2.71724 10.9823 4.6057"
WireWidths=" 0.0762 0.1016 0.15 0.2 0.2032 0.254 0.3048 0.4064 0.508 0.6096 0.8128 1.016 1.27 2.54 0.1524 0.127"
Type="Schematic Editor"
Number=1
File="atkrouter-v01.sch"
View="26.908 21.5177 181 120.578"
WireWidths=" 0.0762 0.1016 0.127 0.15 0.2 0.2032 0.254 0.3048 0.4064 0.508 0.6096 0.8128 1.016 1.27 2.54 0.1524"
PadDiameters=" 0.254 0.3048 0.4064 0.6096 0.8128 1.016 1.27 1.4224 1.6764 1.778 1.9304 2.1844 2.54 3.81 6.4516 0"
PadDrills=" 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.65 0.7 0.75 0.8 0.85 0.9 1 0.6"
ViaDiameters=" 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 1.05 1.1 1.15 1.2 1.3 0"
ViaDrills=" 0.2 0.25 0.3 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 1 0.35"
HoleDrills=" 0.2 0.25 0.3 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 1 0.35"
TextSizes=" 0.254 0.3048 0.4064 0.6096 0.8128 1.016 1.4224 1.6764 1.9304 2.1844 2.54 3.81 5.08 6.4516 1.778 1.27"
TextSizes=" 0.254 0.3048 0.4064 0.6096 0.8128 1.016 1.27 1.4224 1.6764 1.9304 2.1844 2.54 3.81 5.08 6.4516 1.778"
PolygonSpacings=" 0.254 0.3048 0.4064 0.6096 0.8128 1.016 1.4224 1.6764 1.778 1.9304 2.1844 2.54 3.81 5.08 6.4516 1.27"
PolygonIsolates=" 0.254 0.3048 0.4064 0.6096 0.8128 1.016 1.27 1.4224 1.6764 1.778 1.9304 2.1844 2.54 3.81 6.4516 0"
MiterRadiuss=" 0.254 0.3175 0.635 1.27 2.54 1 2 2.5 5 7.5 10 0"
......@@ -87,10 +85,10 @@ DimensionExtWidths=" 0.127 0.254 0.1 0.13 0.26 0"
DimensionExtLengths=" 1.27 2.54 1 2 3 0"
DimensionExtOffsets=" 1.27 2.54 1 2 3 0"
SmdSizes=" 0.3048 0.1524 0.4064 0.2032 0.6096 0.3048 0.8128 0.4064 1.016 0.508 1.27 0.6604 1.4224 0.7112 1.6764 0.8128 1.778 0.9144 1.9304 0.9652 2.1844 1.0668 2.54 1.27 3.81 1.9304 5.08 2.54 6.4516 3.2512 1.27 0.635"
WireBend=0
WireBendSet=0
WireBend=4
WireBendSet=31
WireCap=1
MiterStyle=1
MiterStyle=0
PadShape=0
ViaShape=1
PolygonPour=0
......@@ -109,13 +107,15 @@ SwapLevel=0
ArcDirection=0
AddLevel=2
PadsSameType=0
Layer=21
Layer=97
Views=" 1: 26.908 21.5177 181 120.578"
Sheet="1"
[Win_3]
Type="Board Editor"
Number=3
File="atkrouter-v01.brd"
View="-44.5931 -16.3595 238.559 134.032"
View="-17.3238 13.329 179.31 117.769"
WireWidths=" 0.0762 0.1016 0.127 0.15 0.2 0.6096 0.8128 2.54 0.3048 0.508 0.4064 1.016 1.27 0.2032 0.254 0.1524"
PadDiameters=" 0.254 0.3048 0.4064 0.6096 0.8128 1.016 1.27 1.4224 1.6764 1.778 1.9304 2.1844 2.54 3.81 6.4516 0"
PadDrills=" 0.2 0.25 0.3 0.35 0.4 0.5 0.55 0.65 0.7 0.75 0.8 0.85 0.9 1 0.6 0.45"
......
......@@ -120,7 +120,7 @@ LINKER_SCRIPT_DEP+=
./%.o: .././%.c
@echo Building file: $<
@echo Invoking: AVR/GNU C Compiler : 5.4.0
$(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -x c -funsigned-char -funsigned-bitfields -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\XMEGAA_DFP\1.1.68\include" -O2 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -g2 -Wall -mmcu=atxmega256a3u -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\XMEGAA_DFP\1.1.68\gcc\dev\atxmega256a3u" -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
$(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -x c -funsigned-char -funsigned-bitfields -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\XMEGAA_DFP\1.1.68\include" -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -g2 -Wall -mmcu=atxmega256a3u -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\XMEGAA_DFP\1.1.68\gcc\dev\atxmega256a3u" -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
@echo Finished building: $<
......
......@@ -82,6 +82,7 @@ void atkport_scan(atkport_t *atkp, uint8_t maxpackets){
// debug option
//uart_sendchars_buffered(&upU, atkp->packets[p], atkp->packets[p][0]);
uart_sendchars_buffered(ups[atkp->packets[p][1]], atkp->packets[p], atkp->packets[p][0]);
//uart_sendchars_buffered(ups[0], atkp->packets[p], atkp->packets[p][0]);
}
}
// debug reply (at the moment, reply is handled in atk_handle_packet
......
......@@ -13,7 +13,7 @@
#include "pin.h"
#define ATKPORT_NUM_STATIC_PACKETS 4
#define ATKPORT_NUM_PORTS 6
#define ATKPORT_NUM_PORTS 7
#define ATKPORT_OUTSIDE_PACKET 0
#define ATKPORT_INSIDE_PACKET 1
......
......@@ -41,7 +41,7 @@
</framework-data>
</AsfFrameworkConfig>
<avrtool>com.atmel.avrdbg.tool.atmelice</avrtool>
<avrtoolserialnumber>J41800086407</avrtoolserialnumber>
<avrtoolserialnumber>J41800087098</avrtoolserialnumber>
<avrdeviceexpectedsignature>0x1E9842</avrdeviceexpectedsignature>
<com_atmel_avrdbg_tool_atmelice>
<ToolOptions>
......@@ -51,7 +51,7 @@
<InterfaceName>PDI</InterfaceName>
</ToolOptions>
<ToolType>com.atmel.avrdbg.tool.atmelice</ToolType>
<ToolNumber>J41800086407</ToolNumber>
<ToolNumber>J41800087098</ToolNumber>
<ToolName>Atmel-ICE</ToolName>
</com_atmel_avrdbg_tool_atmelice>
<avrtoolinterface>PDI</avrtoolinterface>
......@@ -116,7 +116,7 @@
<Value>%24(PackRepoDir)\atmel\XMEGAA_DFP\1.1.68\include</Value>
</ListValues>
</avrgcc.compiler.directories.IncludePaths>
<avrgcc.compiler.optimization.level>Optimize more (-O2)</avrgcc.compiler.optimization.level>
<avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>
<avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
<avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
<avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>
......
......@@ -15,28 +15,15 @@
#include "atkport.h"
#include "atkhandler.h"
// results in 0.75MBaud
#define SYSTEM_BAUDA 3
// A: 5 B: 0 - 2uS bit,
// A: 11 B: 0 - 4uS bit, 250kBaud
#define SYSTEM_BAUDA 11
#define SYSTEM_BAUDB 0
#define SYSTEM_NUM_UPS 7
#define PACKUSB_NUM_STATICPACKETS 6
pin_t stlclk;
pin_t stlerr;
// UP USB (UP5)
ringbuffer_t upUrbrx;
ringbuffer_t upUrbtx;
uartport_t upU;
pin_t upUrxled; // don't exist
pin_t upUtxled;
atkport_t atkp6;
// UP0
ringbuffer_t up0rbrx;
......@@ -112,6 +99,18 @@ atkport_t atkp5;
// UPS
// UP USB (UP6)
ringbuffer_t upUrbrx;
ringbuffer_t upUrbtx;
uartport_t upU;
pin_t upUrxled; // don't exist
pin_t upUtxled;
atkport_t atkp6;
uartport_t *ups[SYSTEM_NUM_UPS];
#endif /* HARDWARE_H_ */
\ No newline at end of file
This diff is collapsed.
......@@ -9,7 +9,8 @@
#include "fastmath.h"
uint8_t rb_init(ringbuffer_t *rb){
rb->size = RINGBUFFER_SIZE; // stuck with this, due to not having malloc, wall of skill
rb->size = RINGBUFFER_SIZE;
// stuck with this, due to not having malloc, wall of skill
//rb->buffer = malloc(size);
rb_reset(rb);
return 1;
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment