Rev 2265 | Details | Compare with Previous | Last modification | View Log | SVN | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 801 | linlun | 1 | ## Node specific configuration file for bios |
| 2 | |||
| 3 | HW_NAME=CoreCard |
||
| 4 | HW_VERSION=1 |
||
| 5 | |||
| 6 | _AVRLIB_BIOS_=1 |
||
| 7 | |||
| 8 | # Uncomment to make node autostart after X time-msgs has been sent to node |
||
| 9 | # Do not choose 0 as X, also 1 is a bad choice |
||
| 10 | # This should not be used on nodes with application under developement |
||
| 1855 | arune | 11 | AUTOSTART=2 |
| 801 | linlun | 12 | |
| 13 | # Node hardware id, this number should be unique on your network |
||
| 880 | arune | 14 | # leave as <GENERATE_HW> at first compile, the build will then automatically set it to whatever gets generated (see config.h) |
| 801 | linlun | 15 | # Never set this manually if you are not sure what you are doing |
| 827 | migan | 16 | NODE_HW_ID=<GENERATE_HW> |
| 801 | linlun | 17 | |
| 18 | # example: |
||
| 19 | #NODE_HW_ID=0x12345678 |
||
| 20 | |||
| 21 | # F_CPU is the clock frequency of your microcontroller, check fuses below for external/internal clock source |
||
| 22 | F_CPU=8000000UL |
||
| 23 | |||
| 1640 | arune | 24 | # Device parameters |
| 801 | linlun | 25 | MCU=atmega168 |
| 26 | HIGHFUSE=0xdc |
||
| 27 | LOWFUSE=0xe2 |
||
| 28 | EXTFUSE=0x02 |
||
| 29 | BOOT_START=0x3c00 |
||
| 30 | |||
| 31 | # CAN configuration (old nodes: PORTB, DDRB, PB2) |
||
| 32 | CAN_CONTROLLER=MCP2515 |
||
| 2291 | arune | 33 | CAN_BAUDRATE=250 |
| 801 | linlun | 34 | MCP_CS_PORT=PORTC |
| 35 | MCP_CS_DDR=DDRC |
||
| 36 | MCP_CS_BIT=PC3 |
||
| 37 | MCP_CLOCK_FREQ_MHZ=20 |
||
| 38 | MCP_CLOCK_PRESC=1 |
||
| 39 | |||
| 40 | |||
| 41 | |||
| 1640 | arune | 42 | ################################################################################ |
| 801 | linlun | 43 | # Everything below is just help |
| 1640 | arune | 44 | ################################################################################ |
| 801 | linlun | 45 | |
| 46 | # For MCP_CLOCK_FREQ_MHZ=20 MCP_CLOCK_FREQ_MHZ=16 |
||
| 47 | # MCP_CLOCK_PRESC external clock external clock |
||
| 48 | # 1 20MHz 16MHz |
||
| 49 | # 2 10MHz 8MHz |
||
| 50 | # 4 5MHz 4MHz |
||
| 51 | # 8 2.5MHz 2MHz |
||
| 52 | # Make sure to change F_CPU accordingly if using external clock on AVR (LOWFUSE) |
||
| 53 | |||
| 54 | |||
| 1640 | arune | 55 | #---MEGA8--- |
| 56 | #MCU=atmega8 |
||
| 57 | #HIGHFUSE=0xd4 |
||
| 58 | #LOWFUSE=0x24 |
||
| 59 | #BOOT_START=0x1e00 |
||
| 60 | |||
| 61 | #---MEGA88--- |
||
| 62 | #MCU=atmega88 |
||
| 63 | #HIGHFUSE=0xdc |
||
| 64 | #LOWFUSE=0xe2 |
||
| 65 | #EXTFUSE=0x04 |
||
| 66 | #BOOT_START=0x1e00 |
||
| 67 | |||
| 68 | #---MEGA168--- |
||
| 69 | #MCU=atmega168 |
||
| 70 | #HIGHFUSE=0xdc |
||
| 71 | #LOWFUSE=0xe2 |
||
| 72 | #EXTFUSE=0x02 |
||
| 73 | #BOOT_START=0x3c00 |
||
| 74 | |||
| 75 | #---MEGA328P--- |
||
| 76 | #MCU=atmega328p |
||
| 77 | #HIGHFUSE=0xdc |
||
| 78 | #LOWFUSE=0xe2 |
||
| 79 | #EXTFUSE=0x04 |
||
| 80 | #BOOT_START=0x7c00 |
||
| 81 | |||
| 1748 | arune | 82 | #Force bios to setup ports according below |
| 83 | #INITDDRB=0x0 |
||
| 84 | #INITDDRC=0x0 |
||
| 85 | #INITDDRD=0x0 |
||
| 86 | #INITPORTB=0x0 |
||
| 87 | #INITPORTC=0x0 |
||
| 88 | #INITPORTD=0x0 |
||
| 89 | #INITPINB=0x0 |
||
| 90 | #INITPINC=0x0 |
||
| 91 | #INITPIND=0x0 |
||
| 1640 | arune | 92 | |
| 801 | linlun | 93 | #Some common settings of fuses |
| 94 | #LOWFUSE for mega88 and mega168 |
||
| 95 | #0xe7 #CKDIV8=1, external crystal |
||
| 96 | #0xe0 #CKDIV8=1, external clock (used if mcu is clocked from can-controller, F_CPU should be 16MHz or 20MHz) |
||
| 97 | #0xe2 #CKDIV8=1, internal RC (internal AVR-clock, F_CPU should be 8MHz) |
||
| 98 | #LOWFUSE for mega8 |
||
| 99 | #0x24 #BODLEVEL = 4.0V, BODEN=enabled, internal 8MHz |
||
| 100 | #0x20 #BODLEVEL = 4.0V, BODEN=enabled, external clock |