There are two kinds of situations, that require cas firmware before programming key and that do not require cas firmware. if cas firmware requires please do cas firmware and program key. After programming key, it is possible to restore cas from cas firmware to make it normal. If no cas firmware is required no need to bother with that normally.
To program an additional key it is required to connect HEXTAG/HEXPROG to pc with the extra usb provided and keep hexprog software closed. Go to key learning option 3 and there will be an option to select the key slot. Please select the required key slot and if it is a blank key put the key in hextag/hexprog key coil slot and click Tag to prepare the key file. After that save the key file and click the tick button and there will be a message as key programming is completed. For keyless keys, there are some additional steps like changing the key status from 004b00 to 005b00 after the key file is prepared, and it will work only on 2 slots on the cas for keyless. Please check the given link for a better understanding
E-series-and-mini-program-prepared-bmw-key