CC2430 that has 128KB Flash memory, does it require 17-bit address but for approaching the flash's memory addresses?
Yes 17 bit but the CPU can only address 16 bits.
1) This is not how the 2430 works but may help explain.
My first desk top computer, a Z80, could only address 64k of memory. When I upgraded to a multitasking, I needed more memory. I had memory 64k on a board. I got 4 memory boards. 256k of memory. The CUP had to be tricked into using 4x more memory than it was designed for. One of the I/O ports went to address which memory card was to be used. By theory 256 x 64k. Each program, in the multitasking environment, had to fit into one 64k block. When it was tome to switch form one memory bank to another you needed to go to a certain location in memory, say 10 and then execute a I/O command that switched out memory bank 0 and switched in bank 1. This took you from bank 0 address 10 to bank 1 address 11. (any number from 0 to 255) This worked well. Each program got 64k. No choice. If the program was big, good. If the program was small it got 64k.
2)Next computer was a z180 that had a memory controller much like what you are looking at. The CPU can only think about 64k at a time. Programs are limited to 64K and data is limited to 64K.; But.....The CUP is thinking 0 through ffffh like normal. The I/O location where the bank address is stored is now slightly different. (there are many different kinds of memory management so I will describe one. ) Bank address is now "offset address" and is 24 bit. With in the 24 bits, the top 8 bits are the same as bank switching like before. So you can switch in 256 banks of memory. BUT the lower 16 bits are added to the address the CPU thinks it is using.
CPU address (16 bits) + (Offset address)=Real memory address.
If the offset memory is set to 0. (default) Then the CPU will have its address reflected into memory at:
0000,0000h to 0000,ffffh
If the offset memory is set to 0004,0000,0000h the cpu will work in the range of:
0004,0000 to 0004,ffffh
To solve the problem of having each bank=64k......
If the offset is 0000,0001,0000.
The CPU uses the real memory address 0000,00010000 to 0001,0000ffff.
This allows the CPU to use 64k starting at any location.
The first program could use memory 0 through ffff and the second program could use 1,000 through 1,0000,ffff.
This works well for data. If I am working on video and each picture takes up 30k of memory.
Picture 0 starts at memory 0
Picture 1 is at memory 0 plus (offset =30k)
Picture 2 is at memory 0 plus (offset = 60k)
Picture 3 is at memory 0 plus (offset = 90k) etc.
Note: program and data is limited to 64k chunks. A chunk can be any size less than 64k. Can be located anywhere in real memory.
There are some other ways of dealing with memory but.....hope this helps.